[Modify] Use the try method
This commit is contained in:
parent
7e7ae7b0a4
commit
74b79c1a39
@ -405,7 +405,11 @@ namespace WebSocketSharp.Net
|
||||
if (val.Length == 0)
|
||||
continue;
|
||||
|
||||
cookie.Version = Int32.Parse (val.Unquote ());
|
||||
int num;
|
||||
if (!Int32.TryParse (val.Unquote (), out num))
|
||||
continue;
|
||||
|
||||
cookie.Version = num;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user