Fix passing closing code if valid, updated user agent

This commit is contained in:
Chris Boden 2016-03-14 23:25:52 -04:00
parent cbd376e1b3
commit dd75dafe97
2 changed files with 3 additions and 3 deletions

View File

@ -23,7 +23,7 @@ class ClientNegotiator {
'Connection' => 'Upgrade'
, 'Upgrade' => 'websocket'
, 'Sec-WebSocket-Version' => $this->getVersion()
, 'User-Agent' => "RatchetRFC/0.0.0"
, 'User-Agent' => "Ratchet"
]);
}
@ -50,4 +50,4 @@ class ClientNegotiator {
public function getVersion() {
return 13;
}
}
}

View File

@ -157,7 +157,7 @@ class MessageBuffer {
return $this->newCloseFrame(Frame::CLOSE_BAD_PAYLOAD);
}
return $this->newCloseFrame(Frame::CLOSE_NORMAL);
return $this->newCloseFrame($closeCode);
break;
case Frame::OP_PING:
case Frame::OP_PONG: