[Fix] Unmask it
This commit is contained in:
parent
6effadef75
commit
a0bfa1f52d
@ -1473,13 +1473,26 @@ namespace WebSocketSharp
|
||||
private bool processPingFrame (WebSocketFrame frame)
|
||||
{
|
||||
var data = frame.PayloadData.ApplicationData;
|
||||
if (!send (Fin.Final, Opcode.Pong, data, false))
|
||||
return false;
|
||||
var pong = WebSocketFrame.CreatePongFrame (data, _client);
|
||||
|
||||
lock (_forState) {
|
||||
if (_readyState != WebSocketState.Open) {
|
||||
_logger.Error ("The state of the connection has been changed.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!sendBytes (pong.ToArray ()))
|
||||
return false;
|
||||
}
|
||||
|
||||
_logger.Trace ("A pong has been sent to respond to this ping.");
|
||||
|
||||
if (_emitOnPing)
|
||||
if (_emitOnPing) {
|
||||
if (_client)
|
||||
pong.Unmask ();
|
||||
|
||||
enqueueToMessageEventQueue (new MessageEventArgs (frame));
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user