MegaBits / SIOSocket

Realtime iOS application framework (client) http://socket.io
MIT License
494 stars 80 forks source link

emit doesn't work (fails silently) if payload is string containing erroneous json #29

Open hcientist opened 9 years ago

hcientist commented 9 years ago

accidentally made some bad json, it was a string. tried to emit it, did not emit, fails silently. i tried to emit this: (swift syntax) "{key1:\(myVal1!),key2:'\(myVal2)'}" i suspect the problem was due to my keys not being wrapped in quotes, or my use of single quotes around myVal2, fixing both of these, it works.

hcientist commented 9 years ago

not sure what to do, if possible throw the error?

pcperini commented 9 years ago

Can you please post code to show precisely what you were trying to emit and how? Thanks!

chokri commented 9 years ago

I'm trying to send this by SIOSocket and it fails, I tried to see if it's still not connected by testing if (self.socketIsConnected){ NSLog(@"Start action"); [self.socket emit:@"action" args:@[[NSString stringWithFormat: @"doAction"]]]; }

anuradhavasudeva commented 9 years ago

I have the same issue #45