[Modify] Use the try method

This commit is contained in:
sta 2019-05-30 19:58:31 +09:00
parent d3946e51e4
commit 77bf91cfbe

View File

@ -462,7 +462,11 @@ namespace WebSocketSharp.Net
if (val.Length == 0)
continue;
cookie.MaxAge = Int32.Parse (val.Unquote ());
int num;
if (!Int32.TryParse (val.Unquote (), out num))
continue;
cookie.MaxAge = num;
continue;
}