The code in Server.cpp just uses an 'infinite loop' via an async post for retrying sending messages. This is very obviously a problem when the queue was full, the OH ends up disconnecting, and it retries forever even though the destination server is no longer there.
Instead, it needs to eventually stop retrying and clear up any state from the failed connection. We should probably also make ObjectHostConnectionManager return an error code instead of a bool so that we can tell if the failure was due to a disconnection, which would let us stop retrying and cleanup immediately.
The code in Server.cpp just uses an 'infinite loop' via an async post for retrying sending messages. This is very obviously a problem when the queue was full, the OH ends up disconnecting, and it retries forever even though the destination server is no longer there.
Instead, it needs to eventually stop retrying and clear up any state from the failed connection. We should probably also make ObjectHostConnectionManager return an error code instead of a bool so that we can tell if the failure was due to a disconnection, which would let us stop retrying and cleanup immediately.