I think it would be simpler to track whether you are waiting for the reconnect timer to fire instead of whether the queue is empty.