From 14e931526282dc4c2d5240690b2d43ea92265b4d Mon Sep 17 00:00:00 2001 From: zzz Date: Sun, 19 Nov 2017 21:32:12 +0000 Subject: [PATCH] Streaming: log tweak to assist in fixing ticket #1939 --- .../src/net/i2p/client/streaming/impl/Connection.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java index d01d7a1da..efc3717f3 100644 --- a/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java +++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/Connection.java @@ -1017,6 +1017,8 @@ class Connection { public void setChoking(boolean on) { if (on != _isChoking) { _isChoking = on; + if (_log.shouldWarn()) + _log.warn("Choking changed to " + on + " on " + this); if (!on) _unchokesToSend.set(UNCHOKES_TO_SEND); ackImmediately(); @@ -1031,7 +1033,11 @@ class Connection { * @since 0.9.29 */ public void setChoked(boolean on) { - _isChoked = on; + if (on != _isChoked) { + _isChoked = on; + if (_log.shouldWarn()) + _log.warn("Choked changed to " + on + " on " + this); + } if (on) { congestionOccurred(); // https://en.wikipedia.org/wiki/Transmission_Control_Protocol