OF-883: Prevent multiple closes of the same connection.
When a connection is closed, several events can be involved (and can be triggered). Some of these events will attempt to close the connection (if it hadn't been already). This, at best, least to multiple invocations of close-listeners. At worst, a loop of close-calls is created. This commit replaces the two-way boolean that guards closure (isClosed) with a three-way guard. Now, a distinction is made between between a connection that is closed, and one that is closing. Additionally, some null pointer guards have been added, as I've seen those pop up in my local logs during development.
Showing
Please register or sign in to comment