Skip to content

Commit 021f94e

Browse files
author
Gavin Norman
committed
Override connection handler's buffer size limit warning
The size of batch buffers is now configurable, so the buffer size warning limit is adapted to the same value.
1 parent 128e69b commit 021f94e

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/dhtnode/connection/DhtConnectionHandler.d

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,20 @@ public class DhtConnectionHandler
519519
}
520520

521521

522+
/***************************************************************************
523+
524+
Returns:
525+
the maximum buffer size that is considered sane for a DHT node
526+
527+
***************************************************************************/
528+
529+
override protected ulong bufferSizeWarnLimit ( )
530+
{
531+
return (cast(DhtConnectionSetupParams)this.setup)
532+
.storage_channels.batch_size;
533+
}
534+
535+
522536
/***************************************************************************
523537
524538
Command code 'None' handler. Treated the same as an invalid command

0 commit comments

Comments
 (0)