title: Concurrent.patchPanel not sending data from multiple enumerators - only sends from last enumerator added
body: <p>I'm hoping someone else has used patchPanel to combine multiple enumerators together going down to a client over a websocket. The issue i'm running into is that the patchPanel is only sending the data feed from the last enumerator added into it. </p>
  
  <p>I followed the example from; <a href="http://lambdaz.blogspot.ca/2012/12/play-21-multiplexing-enumerators-into.html" rel="nofollow">http://lambdaz.blogspot.ca/2012/12/play-21-multiplexing-enumerators-into.html</a> which is the only reference I've been able to find regarding patchPanel. </p>
  
  <p>Versions; play! 2.1.1 (using Java 1.7.0_11 and Scala 2.10.0)</p>
  
  <p>The web socket method;</p>
  
  <pre><code>def monitorStream = WebSocket.async[JsValue] { request =&gt;
    val promiseIn = promise[Iteratee[JsValue, Unit]]
    val out = Concurrent.patchPanel[JsValue] { patcher =&gt;
      val in = Iteratee.foreach[JsValue] { json =&gt;
        val event:Option[String] = (json \ "event").asOpt[String]
        val systemId = (json \ "systemId").as[Long]
        event.getOrElse("") match {
          case "join" =&gt; 
            val physicalSystem = SystemIdHandler.getById(systemId)
            val monitorOut = (MonitorStreamActor.joinMonitor(physicalSystem)) 
            monitorOut map { enum =&gt;
              val success = patcher.patchIn(enum)
          }
        }
      }.mapDone { _ =&gt; Logger.info("Disconnected") }
      promiseIn.success(in)
    }
    future(Iteratee.flatten(promiseIn.future),out)
  }
  </code></pre>
  
  <p>The MonitorStreamActor call;</p>
  
  <pre><code>  def joinMonitor(physicalSystem: PhysicalSystem):
      scala.concurrent.Future[Enumerator[JsValue]]
       = {
      val monitorActor = ActorBase.akkaSystem.actorFor("/user/system-" + physicalSystem.name +"/stream")
      (monitorActor ? MonitorJoin()).map {
        case MonitorConnected(enumerator) =&gt;
          enumerator
        }
  
    }
  </code></pre>
  
  <p>The enumerator is returned fine, and the data fed into it is coming from a timer calling the actor. Actor definition, the timer hits the UpdatedTranStates case;</p>
  
  <pre><code>class MonitorStreamActor() extends Actor {
    val (monitorEnumerator, monitorChannel) = Concurrent.broadcast[JsValue]
    import play.api.Play.current
    def receive = {
      case MonitorJoin() =&gt; {
        Logger.debug ("Actor monitor join")
        sender ! MonitorConnected(monitorEnumerator)
      }
      case UpdatedTranStates(systemName,tranStates) =&gt; {
        //println("Got updated Tran States")
        val json = Json.toJson(tranStates.map(m =&gt; Map("State" -&gt; m._1, "Count" -&gt; m._2) ))
        //println("Pushing updates to monitorChannel")
        sendUpdateToClients(systemName, "states", json)
      }
    def sendUpdateToClients(systemName:String, updateType:String, json:JsValue) {
      monitorChannel.push(Json.toJson(
        Map(
          "dataType"-&gt;Json.toJson(updateType),
          "systemName" -&gt; Json.toJson(systemName),
          "data"-&gt;json)))
    }
  }
  }
  </code></pre>
  
  <p>I've poked around for a while on this and haven't found a reason why only the last enumerator that is added into the patchPanel has the data sent. the API docs are not of much help, it really sounds like all you have to do is call patchIn and it should combine all enumerators to an iteratee, but that doesn't seem to be the case.</p>