Hello!
I am developing a realtime multiplayer game in CoronaSDK and I am using the connection recovery code that was posted as a tutorial on your site. It works great most of the time, but then once in a while it throws an assertion when recovering that looks like this:
Mar 10 18:15:45.042: 145.189436 : read some partial bytes 9
Mar 10 18:15:48.033: 145.260276 : read some partial bytes 9
Mar 10 18:15:51.042: 145.331455 : read some partial bytes 9
Mar 10 18:16:12.896: 145.376842 : closed socket
Mar 10 18:16:12.897: OnConnectDone: Recovering...
Mar 10 18:17:02.575: 145.388269 : channel connected
Mar 10 18:17:02.694: 145.504694 : closed socket
Mar 10 18:17:02.694: OnConnectDone: Recovering...
Mar 10 18:18:02.733: 145.509534 : channel connected
Mar 10 18:18:02.855: 145.631512 : closed socket
Mar 10 18:18:02.856: OnConnectDone: Recovering...
Mar 10 18:18:14.974: 145.636174 : channel connected
Mar 10 18:18:15.069: 145.70108 : read some partial bytes 28
Mar 10 18:18:15.073: Runtime error
/Users/Eva/Documents/EggGame/AppWarp/JSON.lua:527: /Users/Eva/Documents/EggGame/AppWarp/JSON.lua:242: can't parse JSON at char 1 of: Incorrect Signature
stack traceback:
[C]: in function 'assert'
/Users/Eva/Documents/EggGame/AppWarp/JSON.lua:527: in function 'decode'
/Users/Eva/Documents/EggGame/AppWarp/WarpClient.lua:120: in function 'onResponse'
/Users/Eva/Documents/EggGame/AppWarp/WarpClient.lua:332: in function 'receivedData'
/Users/Eva/Documents/EggGame/AppWarp/WarpChannel.lua:51: in function 'socket_recv'
/Users/Eva/Documents/EggGame/AppWarp/WarpClient.lua:442: in function 'Loop'
/Users/Eva/Documents/EggGame/warplisteners.lua:27: in function </Users/Eva/Documents/EggGame/warplisteners.lua:26>
?: in function <?:221>
Note that this happens in the Corona Simulator, just sitting there idle in the background. Any immediate thoughts come to mind? I can post some code bits if need be...
Thanks in advance!
Gary