You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SPY-192: Ensure connection key is valid before checking if writable.
Motivation
----------
It has been discovered in the wild that sometimes CancelledKeyException are
received even if the key has been checked for validity before. It turns out
that the validity can change between the check and the next function call.
Modifications
-------------
The changeset makes sure to check if it is valid on both reading and
subsequent writing, reducing the chance of race conditions and interleaved
state changes.
Result
------
More stable behavior at runtime and less chance of CancelledKeyException.
Change-Id: Ic0db65f9c7ccc3a7b9738aaff0e3c7e60d7f25c2
Reviewed-on: http://review.couchbase.org/72270
Reviewed-by: Michael Nitschinger <michael@nitschinger.at>
Tested-by: Michael Nitschinger <michael@nitschinger.at>
0 commit comments