Skip to content

Commit dc3ceb1

Browse files
jacargentinamattqs
authored andcommitted
Fix #147: no socket for namespace undefined (#148)
Will be pushed to nuget in next release: 2 July 2018
1 parent c85148b commit dc3ceb1

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

  • Src/SocketIoClientDotNet.net45/Parser

Src/SocketIoClientDotNet.net45/Parser/Parser.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ private string EncodeAsString(Packet obj)
9797
if (obj.Data != null)
9898
{
9999
if (nsp) str.Append(",");
100-
str.Append(obj.Data);
100+
if ((obj.Data as JToken).HasValues)
101+
{
102+
str.Append(obj.Data);
103+
}
101104
}
102105

103106
var log = LogManager.GetLogger(Global.CallerName());

0 commit comments

Comments
 (0)