diff --git a/websocket-sharp/MessageEventArgs.cs b/websocket-sharp/MessageEventArgs.cs index adf7391a..7940f98b 100644 --- a/websocket-sharp/MessageEventArgs.cs +++ b/websocket-sharp/MessageEventArgs.cs @@ -171,7 +171,10 @@ namespace WebSocketSharp return; } - _data = _rawData.UTF8Decode (); + string data; + if (_rawData.TryGetUTF8DecodedString (out data)) + _data = data; + _dataSet = true; }