Ensure we don't end up with jobs in limbo

Authored by cmollekopf on Nov 9 2019, 6:36 PM.

Description

Ensure we don't end up with jobs in limbo

This prevents jobs from stalling forever if there is no connection
available. Usually the first job would be removed by a socket disconnect
if we failed to connect. However, if we later start another job after the initial disconnect
it will just silently stall forever. With this change the added job will also immediately be
stopped.

However, during normal operation we initially want to be able to start a
couple of jobs, that are then executed once the socket is connected.
We therefore allow jobs to linger in the queue if we have the socket in
a state that is guaranteed to change eventually (anything but unconnected).
To ensure that we get immediately to the connecting state we no longer
delay the initial reconnect.

The isSocketConnected variable was just historical baggage that we no
longer needed (and the removed check for closeSocket(), is just not
necessary I hope).

Details

Committed
cmollekopfNov 9 2019, 10:53 PM
Parents
R250:c4903436b77f: Use QTRY_COMPARE
Branches
Unknown
Tags
Unknown