[WebSocket] Closing frame bug fix

This commit is contained in:
Chris Boden 2012-07-15 12:15:54 -04:00
parent a2edc02d97
commit fbe1d1763b

View File

@ -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();