[Modify] Replace it

This commit is contained in:
sta 2016-01-16 15:36:12 +09:00
parent b3541bc787
commit a849b1c73e

View File

@ -957,15 +957,8 @@ namespace WebSocketSharp
setClientStream ();
var res = sendHandshakeRequest ();
var msg = checkIfValidHandshakeResponse (res);
if (msg != null) {
_logger.Error (msg);
msg = "An error has occurred while connecting.";
error (msg, null);
close (new CloseEventArgs (CloseStatusCode.Abnormal, msg), false, false, false);
return false;
}
if (msg != null)
throw new WebSocketException (CloseStatusCode.ProtocolError, msg);
var cookies = res.Cookies;
if (cookies.Count > 0)