Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The connection monitor is a thread we spawn for each RPC; it's job is to monitor the connection and close the RPC if the entire connection is closed. In order to prevent memory leaks, the thread also terminates when the RPC is closed independent of the connection. However, we were waiting for termination of the _outbound_ thread to determine if the RPC is closed; it's better to wait for termination of the _inbound_ thread, because the outbound thread is terminated when the client sends its final message, but at that point we might still be waiting on further messages from the server. This doesn't matter too much, but becomes important in the next commit.
- Loading branch information