[Modify] Add null check
This commit is contained in:
parent
a89eecc5c5
commit
23fb7c0434
@ -83,6 +83,9 @@ namespace WebSocketSharp.Net
|
||||
var pref = new HttpListenerPrefix (uriPrefix);
|
||||
|
||||
var addr = convertToIPAddress (pref.Host);
|
||||
if (addr == null)
|
||||
throw new HttpListenerException (87, "Includes an invalid host.");
|
||||
|
||||
if (!addr.IsLocal ())
|
||||
throw new HttpListenerException (87, "Includes an invalid host.");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user