mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2024-11-19 18:02:54 +01:00
change stream to use backpressure (#4654)
This commit is contained in:
parent
288918d705
commit
4e4e4aa9ed
@ -376,8 +376,9 @@ case class PeerManager(
|
||||
}
|
||||
|
||||
private val dataMessageStreamSource = Source
|
||||
.queue[StreamDataMessageWrapper](10000,
|
||||
overflowStrategy = OverflowStrategy.fail)
|
||||
.queue[StreamDataMessageWrapper](1500,
|
||||
overflowStrategy =
|
||||
OverflowStrategy.backpressure)
|
||||
.mapAsync(1) {
|
||||
case msg @ DataMessageWrapper(payload, peerMsgSender, peer) =>
|
||||
logger.debug(s"Got ${payload.commandName} from ${peer} in stream")
|
||||
|
Loading…
Reference in New Issue
Block a user