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' 'Connection' => 'Upgrade'
, 'Upgrade' => 'websocket' , 'Upgrade' => 'websocket'
, 'Sec-WebSocket-Version' => $this->getVersion() , 'Sec-WebSocket-Version' => $this->getVersion()
, 'User-Agent' => "RatchetRFC/0.0.0" , 'User-Agent' => "Ratchet"
]); ]);
} }

View File

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