Fixed frame creation type bug
This commit is contained in:
parent
2283bdf288
commit
bbced3b765
@ -15,7 +15,7 @@ class WsConnection extends AbstractConnectionDecorator {
|
||||
public function send($msg, $isBinary = false) {
|
||||
if (!$this->WebSocket->closing) {
|
||||
if (!($msg instanceof DataInterface)) {
|
||||
$msg = new Frame($msg, true, ((boolean)$isBinary ? Frame::OP_TEXT : Frame::OP_BINARY));
|
||||
$msg = new Frame($msg, true, ((boolean)$isBinary ? Frame::OP_BINARY : Frame::OP_TEXT));
|
||||
}
|
||||
|
||||
$this->getConnection()->send($msg->getContents());
|
||||
|
Loading…
Reference in New Issue
Block a user