There is no auto keep alive functionality in Rebex HTTP. If you want to keep the connection alive, you have to send some data to the server periodically for yourself.
If I would do this for general case, I would create
Noop() method on the WebService, which will just return "OK". I would call this WS method in background every 30 seconds, so the connection will never expire. I would do it with two conditions:
Noop is not performed if any other request is currently running.
Noop is currently running, new requests will wait for
Noop to finish.
However, please note about consequences it will take. The 20 seconds delay is very probably caused by re-establishing the Internet connection. The device closed Internet connection "subsystem" during idle to save battery, etc. If new request was started after 1 hour of idle, the device connection manager had to establish Internet connection "subsystem" first, then new TCP/IP connections could be established. It can take observed 20 seconds.