Skip to content

Commit 4a25597

Browse files
committed
[JAVA-282]: on ioexception, call to port.close() after putting back port in the pool, may break other thread that is using port
1 parent 6f91dc9 commit 4a25597

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/com/mongodb/DBTCPConnector.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,8 @@ void done( DBPort p ){
351351
* @param e
352352
*/
353353
void error( DBPort p , Exception e ){
354-
p.getPool().done( p );
355354
p.close();
355+
p.getPool().done( p );
356356

357357
_requestPort = null;
358358
_logger.log( Level.SEVERE , "MyPort.error called" , e );

0 commit comments

Comments
 (0)