[WebSocket] Closing frame bug fix
This commit is contained in:
parent
a2edc02d97
commit
fbe1d1763b
@ -23,7 +23,7 @@ class Connection extends AbstractConnectionDecorator {
|
|||||||
if ($code instanceof DataInterface) {
|
if ($code instanceof DataInterface) {
|
||||||
$this->send($code);
|
$this->send($code);
|
||||||
} else {
|
} else {
|
||||||
$this->send(new Frame(Frame::encode(sprintf('%016b', $code)), true, Frame::OP_CLOSE));
|
$this->send(new Frame(pack('n', $code), true, Frame::OP_CLOSE));
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->getConnection()->close();
|
$this->getConnection()->close();
|
||||||
|
Loading…
Reference in New Issue
Block a user