use `LPProtocol.new` instead of `LPProtocol()` (#6117)
Avoid potenial issue with https://github.com/vacp2p/nim-libp2p/pull/1064#discussion_r1534021691 in a future dependency bump.
This commit is contained in:
parent
213076e4cd
commit
9256db2265
|
@ -2013,7 +2013,8 @@ proc p2pProtocolBackendImpl*(p: P2PProtocol): Backend =
|
||||||
|
|
||||||
try:
|
try:
|
||||||
mount `networkVar`.switch,
|
mount `networkVar`.switch,
|
||||||
LPProtocol(codecs: @[`codecNameLit`], handler: snappyThunk)
|
LPProtocol.new(
|
||||||
|
codecs = @[`codecNameLit`], handler = snappyThunk)
|
||||||
except LPError as exc:
|
except LPError as exc:
|
||||||
# Failure here indicates that the mounting was done incorrectly which
|
# Failure here indicates that the mounting was done incorrectly which
|
||||||
# would be a programming error
|
# would be a programming error
|
||||||
|
|
Loading…
Reference in New Issue