JAVA-6210ClosedFixed

Close connection on responseTo mismatch and harden async error handling to prevent stream desynchronization

Two categories of issue were identified in {{InternalStreamConnection}}: *1. No connection close on responseTo mismatch detection* {{getCommandResult()}} detects the mismatch and throws {{MongoInternalException}}, but callers in both the sync ({{sendAndReceive}}) and async ({{sendCommandMessageAsync}}) paths did not catch {{MongoInternalException}} separately — it fell through to the generic {{Exception}} handler which does *not* close the connection. The corrupted connection was re

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
5.10.0
Components
Server components related to this issue
Connection Management
Labels
Tags and classification
priority