freehandvn / gtalksms

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

Fix reconnect thread #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In the process of trying to get gtalksms to connect, I noticed the reconnect 
runnable is happening on the main thread rather than the service thread - this 
is undesirable - even with the locks there is some state confusion that can 
happen and it also caused the main thread to be blocked while the connection 
happens (and for me, this is currently taking ~30 seconds before failing)

The solution was to have the reconnect runnable just call startService, so the 
reconnection happens on the service worker thread.  I also removed the locks 
and replaced them with explicit checks that we are being called on a single 
thread - in many ways it is better to die loudly when this assumption is 
violated rather than just ensuring the bad request is serialized.

Original issue reported on code.google.com by skippy.hammond@gmail.com on 5 Feb 2011 at 6:00

Attachments:

GoogleCodeExporter commented 9 years ago

Original comment by Florent....@gmail.com on 5 Feb 2011 at 8:48

GoogleCodeExporter commented 9 years ago
Fixed in v1.9

Original comment by Florent....@gmail.com on 6 Feb 2011 at 8:27

GoogleCodeExporter commented 9 years ago

Original comment by fschm...@gmail.com on 25 Aug 2011 at 7:51