diff --git a/lib/Ratchet/Protocol/WebSocket.php b/lib/Ratchet/Protocol/WebSocket.php index c788a66..24ea8d8 100644 --- a/lib/Ratchet/Protocol/WebSocket.php +++ b/lib/Ratchet/Protocol/WebSocket.php @@ -126,6 +126,7 @@ class WebSocket implements ProtocolInterface { if ($command instanceof SendMessage) { $version = $this->_clients[$command->getSocket()]->getVersion(); return $command->setMessage($version->frame($command->getMessage())); +<<<<<<< HEAD } if ($command instanceof \Traversable) { @@ -134,6 +135,16 @@ class WebSocket implements ProtocolInterface { } } +======= + } + + if ($command instanceof \Traversable) { + foreach ($command as $cmd) { + $cmd = $this->prepareCommand($cmd); + } + } + +>>>>>>> 1d14119bb5582cf8ebfd7c506cbb93f3368ce852 return $command; }