Skip to content

Commit

Permalink
Override connection handler's buffer size limit warning
Browse files Browse the repository at this point in the history
The size of batch buffers is now configurable, so the buffer size warning
limit is adapted to the same value.
  • Loading branch information
Gavin Norman committed Dec 13, 2018
1 parent 128e69b commit 021f94e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/dhtnode/connection/DhtConnectionHandler.d
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,20 @@ public class DhtConnectionHandler
}


/***************************************************************************
Returns:
the maximum buffer size that is considered sane for a DHT node
***************************************************************************/

override protected ulong bufferSizeWarnLimit ( )
{
return (cast(DhtConnectionSetupParams)this.setup)
.storage_channels.batch_size;
}


/***************************************************************************
Command code 'None' handler. Treated the same as an invalid command
Expand Down

0 comments on commit 021f94e

Please sign in to comment.