Skip to content

Commit 9dd21a8

Browse files
committed
Fixed data race.
1 parent 4c1d0ef commit 9dd21a8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/src/org/jsl/collider/ConnectorImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,10 @@ else if (state == CONNECTING)
457457
public int handleReadyOps( ThreadPool threadPool )
458458
{
459459
assert( m_selectionKey.readyOps() == SelectionKey.OP_CONNECT );
460+
m_selectionKey.interestOps( 0 );
460461
m_collider.executeInThreadPool( new Starter3(m_socketChannel, m_selectionKey) );
461-
m_selectionKey.interestOps(0);
462-
m_selectionKey = null;
463462
m_socketChannel = null;
463+
m_selectionKey = null;
464464
return 0;
465465
}
466466
}

0 commit comments

Comments
 (0)