Opened 3 months ago

Closed 3 months ago

#2769 closed defect (fixed)

NTCP2 skips afterSend()

Reported by: jogger Owned by: zzz
Priority: major Milestone: 0.9.48
Component: router/transport Version: 0.9.47
Keywords: Cc:
Parent Tickets: Sensitive: no

Description

Dead simple: When NTCP2 batches together multiple messages in prepareNextWriteNTCP2(PrepBuffer? buf), only the first message is added to _currentOutbound. The remaining messages never get through to afterSend(). Could also be a higher prio, since we miss send success jobs this way.

Subtickets

Change History (3)

comment:1 Changed 3 months ago by zzz

Milestone: undecided0.9.48
Status: newaccepted

comment:2 Changed 3 months ago by zzz

proposed fix, untested:

--- router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java	6bdbea00d9ea158a8c07b72559ef18c9b9c3c7be
+++ router/java/src/net/i2p/router/transport/ntcp/NTCPConnection.java	e8d0c8e426148f905be973c8bea6b787f9e8cbbc
@@ -905,6 +905,7 @@ public class NTCPConnection implements C
                         break;
                     }
                     if (msg.getExpiration() >= now) {
+                        _currentOutbound.add(msg);
                         block = new NTCP2Payload.I2NPBlock(m);
                         blocks.add(block);
                         size += NTCP2Payload.BLOCK_HEADER_SIZE + msz;

comment:3 Changed 3 months ago by zzz

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.