Skip to content

Commit 087b647

Browse files
committed
Merge pull request #96 from tobicz/master
bugfix: check first if the token KEY_PLACEHOLDER is available, otherwise an exception occurs and null is returned
2 parents 024afa8 + fd2b1ac commit 087b647

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • Src/SocketIoClientDotNet.net45/Parser

Src/SocketIoClientDotNet.net45/Parser/Binary.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,8 @@ private static object _reconstructPacket(object data, byte[][] buffers)
192192
var newData1 = new JObject();
193193
var _data1 = (JObject)data;
194194

195-
if ((bool) _data1[KEY_PLACEHOLDER])
195+
//if ((bool) _data1[KEY_PLACEHOLDER])
196+
if (_data1.SelectToken(KEY_PLACEHOLDER) != null && (bool) _data1[KEY_PLACEHOLDER])
196197
{
197198
var num = (int)_data1[KEY_NUM];
198199
return num >= 0 && num < buffers.Length ? buffers[num] : null;

0 commit comments

Comments
 (0)