Timeout configurable
|
|
I am having issues with BiteSMS on iOS4 when there is a bad internet connection available. The network is connected, but no internet is available. It then basically just ‘Hangs’ at sending. Sometimes it times out, after a minute of 5, and a retry then works. I want the option to retry after 15 seconds however – if it didnt send in 15 seconds, its not going to in the next 5 minutes either. My workaround right now is to restart the phone, since that force-cancels the sending. From that point on I can resubmit and successfully send the message. Any thoughts on this? It would be nice if the timeout could be configurable, or, just turned down alot. On the technical side, my suspicion is that BiteSMS opens a TCP socket to send the message to the BiteSMS server. This socket doesnt directly connect since no internet connectivity is available. However when internet connectivity becomes available, the existing socket does not use that – possibly since the Network interface changed (ie from 3G to Wifi). What needs to be done is close the existing socket after 15 seconds, and open a new one to re-try. Possibly the best solution would be to close the socket after 15 seconds, and retry. This can be done, say, 2 times. Then it gives up and allows the user to manually retry again. Alternatively what would work as well is ‘cancel’ functionality when sending, so that a hanging send can be interrupted and retried. Thanks! |