Skip to content

Commit cd15012

Browse files
committed
Mask the close frame
1 parent a53f6c5 commit cd15012

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/WebSocket.php

+1
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ public function send($msg) {
130130

131131
public function close($code = 1000, $reason = '') {
132132
$frame = new Frame(pack('n', $code) . $reason, true, Frame::OP_CLOSE);
133+
$frame->maskPayload();
133134
$this->_stream->write($frame->getContents());
134135

135136
$closeFn = $this->_close;

0 commit comments

Comments
 (0)