|
|
|
@ -1017,8 +1017,12 @@ namespace WebSocketSharp
|
|
|
|
var res = sendHandshakeRequest ();
|
|
|
|
var res = sendHandshakeRequest ();
|
|
|
|
|
|
|
|
|
|
|
|
string msg;
|
|
|
|
string msg;
|
|
|
|
if (!checkHandshakeResponse (res, out msg))
|
|
|
|
if (!checkHandshakeResponse (res, out msg)) {
|
|
|
|
throw new WebSocketException (CloseStatusCode.ProtocolError, msg);
|
|
|
|
_logger.Fatal (msg);
|
|
|
|
|
|
|
|
fatal ("An error has occurred while connecting.", CloseStatusCode.ProtocolError);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (_protocolsRequested)
|
|
|
|
if (_protocolsRequested)
|
|
|
|
_protocol = res.Headers["Sec-WebSocket-Protocol"];
|
|
|
|
_protocol = res.Headers["Sec-WebSocket-Protocol"];
|
|
|
|
|