diff options
author | Alan Young <consult.awy@gmail.com> | 2015-04-28 10:28:12 (GMT) |
---|---|---|
committer | Alan Young <consult.awy@gmail.com> | 2015-05-01 08:17:31 (GMT) |
commit | cd8e073cabc9a39abb14527b6e968ece1586b7ec (patch) | |
tree | ae2655de2bc46e632e6f75a6150d742b26813d00 /test | |
parent | de8538282dfbb73212fa241638147a64bbe9cee5 (diff) | |
download | stroke-cd8e073cabc9a39abb14527b6e968ece1586b7ec.zip stroke-cd8e073cabc9a39abb14527b6e968ece1586b7ec.tar.bz2 |
Revisit handling of JavaConnection race conditions.
JavaConnection.disconnect() can be called at any time when opening or
using the connection. Its use can interfere with tests for
selector_.isOpen(). Protect relevant code by synchronization blocks.
This should not cause any contended synchronization issue as contention
can only occur while disconnecting. This reverts the relevant part of
7d2101b9.
Move selector_.select() call to end of Worker.run() while loop so that
any write that is done while still connecting (if that is permitted and
possible), and before selector_ first become non-null, is still picked
up.
Remove redundant checks on disconnecting_ and calls to
handleDisconnected(null).
Move a couple of fields which are only used in Worker nested class into
Worker.
Update copyright.
Change-Id: I2eabad79c69fe4e9206942c8025e0ac012bffdb0
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions