emit doesn't work (fails silently) if payload is string containing erroneous json
Opened this issue · 4 comments
hcientist commented
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
not sure what to do, if possible throw the error?
pcperini commented
Can you please post code to show precisely what you were trying to emit and how? Thanks!
chokri commented
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
I have the same issue #45