[Modify] Use the try method

This commit is contained in:
sta 2019-05-26 21:50:54 +09:00
parent 7e7ae7b0a4
commit 74b79c1a39

View File

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