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