chandramanic / unitt

Automatically exported from code.google.com/p/unitt
0 stars 0 forks source link

read operation time out after 30 seconds idle #50

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Websocket got disconnected after 30 seconds idle
I can't set "keepalive" to set heartbeat as there will be an error occurring at 
[WebSocket stopPingTimer] and force the app to close

I'm using the latest library.

Original issue reported on code.google.com by vasco...@gmail.com on 30 Jul 2012 at 11:19

Attachments:

GoogleCodeExporter commented 9 years ago
I have found the issue and am actively working on a fix. Thank you for the 
ticket!

Original comment by joshuadmorris@gmail.com on 11 Aug 2012 at 5:05

GoogleCodeExporter commented 9 years ago
Any news on this issue? 

I'm having a similar problem - it also has to do with the pingTimer-Handling: I 
do not run into a timeout, but after closing the connection & releasing the 
websocket the socket crashes when deallocating. 

I found a way to solve this issue it for me:
The pingTimer retains the WebSocket, which is intended and okay, but when the 
timer is invalidated and it releases the socket (which in my case is 
deallocated then), the socket is trying to release the timer, which then causes 
the crash.

The WebSocket does not (and that is okay, because you should not retain) this 
timer - but it does (and you should not) release it when deallocating the 
webSocket. You do not need to release it, because you do not retain it in the 
first place, simply drop the [pingTimer release] in the deallocation of the 
socket and it works.

Also: When invalidating the pingTimer in stopPingTimer, i would set it to nil - 
because otherwise it could crash if you call invalidate again.

Original comment by woes...@gmail.com on 20 Oct 2012 at 10:37

GoogleCodeExporter commented 9 years ago
This should be fixed in the 1.0.0 release.

Original comment by joshuadmorris@gmail.com on 11 Dec 2012 at 5:18