[Modify] Polish it

This commit is contained in:
sta 2019-01-19 22:24:32 +09:00
parent fb1e0cdd04
commit 1cf3c988a9

View File

@ -721,8 +721,9 @@ namespace WebSocketSharp.Net
return null; return null;
schm = uri.Scheme; schm = uri.Scheme;
var valid = (schm.StartsWith ("http") && !websocketRequest) var valid = websocketRequest
|| (schm.StartsWith ("ws") && websocketRequest); ? schm == "ws" || schm == "wss"
: schm == "http" || schm == "https";
if (!valid) if (!valid)
return null; return null;