sirikata / sirikata

Sirikata is a BSD-licensed platform for networked 3d environments
http://www.sirikata.com/
Other
126 stars 39 forks source link

Server retries sending session messages indefinitely #483

Closed ewencp closed 12 years ago

ewencp commented 12 years ago

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.