NTCP: Fix clearing of write interest ops at

inbound establishment, causing latency on first message
(ticket #2237)
This commit is contained in:
zzz
2018-06-13 10:42:53 +00:00
parent aa98e540e0
commit da5de2fd4a
3 changed files with 6 additions and 2 deletions

View File

@ -18,7 +18,7 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 18;
public final static long BUILD = 19;
/** for example "-test" */
public final static String EXTRA = "";

View File

@ -679,7 +679,7 @@ public class NTCPConnection implements Closeable {
* as it occurs in the selector thread)
*/
public void outboundConnected() {
_conKey.interestOps(SelectionKey.OP_READ);
_conKey.interestOps(_conKey.interestOps() | SelectionKey.OP_READ);
// schedule up the beginning of our handshaking by calling prepareNextWrite on the
// writer thread pool
_transport.getWriter().wantsWrite(this, "outbound connected");