My client use the LagMonitor to tracking latency of the connection. But when LostConnection event was dispatched, my client thrown a exception:
11-04 15:06:21.370: E/AndroidRuntime(19759): FATAL EXCEPTION: Timer-2
11-04 15:06:21.370: E/AndroidRuntime(19759): java.lang.NullPointerException
11-04 15:06:21.370: E/AndroidRuntime(19759): at sfs2x.client.core.sockets.TCPSocketLayer.writeSocket(TCPSocketLayer.java:182)
11-04 15:06:21.370: E/AndroidRuntime(19759): at sfs2x.client.core.sockets.TCPSocketLayer.write(TCPSocketLayer.java:303)
11-04 15:06:21.370: E/AndroidRuntime(19759): at sfs2x.client.core.SFSIOHandler.writeTCP(SFSIOHandler.java:426)
11-04 15:06:21.370: E/AndroidRuntime(19759): at sfs2x.client.core.SFSIOHandler.onDataWrite(SFSIOHandler.java:420)
11-04 15:06:21.370: E/AndroidRuntime(19759): at sfs2x.client.core.SFSProtocolCodec.onPacketWrite(SFSProtocolCodec.java:79)
11-04 15:06:21.370: E/AndroidRuntime(19759): at sfs2x.client.bitswarm.BitSwarmClient.send(BitSwarmClient.java:234)
11-04 15:06:21.370: E/AndroidRuntime(19759): at sfs2x.client.SmartFox.send(SmartFox.java:1026)
11-04 15:06:21.370: E/AndroidRuntime(19759): at sfs2x.client.util.LagMonitor$PollTimerTask.run(LagMonitor.java:107)
11-04 15:06:21.370: E/AndroidRuntime(19759): at java.util.Timer$TimerImpl.run(Timer.java:284)
How do catch this exception?
LagMonitor: NullPointerException when LostConnection
Re: LagMonitor: NullPointerException when LostConnection
Hi,
we just released an update of the API with this fix.
See here:
viewtopic.php?f=22&t=17535&p=76078#p76078
cheers
we just released an update of the API with this fix.
See here:
viewtopic.php?f=22&t=17535&p=76078#p76078
cheers
Return to “SFS2X Java / Android API”
Who is online
Users browsing this forum: No registered users and 36 guests