mirror of https://github.com/vacp2p/nim-libp2p.git
add some verbosity to multistream handshake for debugging pruposes
This commit is contained in:
parent
0f06ae5a1d
commit
afcfd27aa0
|
@ -120,7 +120,7 @@ proc list*(m: MultistreamSelect,
|
||||||
result = list
|
result = list
|
||||||
|
|
||||||
proc handle*(m: MultistreamSelect, conn: Connection, active: bool = false) {.async, gcsafe.} =
|
proc handle*(m: MultistreamSelect, conn: Connection, active: bool = false) {.async, gcsafe.} =
|
||||||
trace "handle: starting multistream handling"
|
trace "handle: starting multistream handling", handshaked = active
|
||||||
var handshaked = active
|
var handshaked = active
|
||||||
try:
|
try:
|
||||||
while not conn.closed:
|
while not conn.closed:
|
||||||
|
@ -154,6 +154,7 @@ proc handle*(m: MultistreamSelect, conn: Connection, active: bool = false) {.asy
|
||||||
await conn.write(m.codec)
|
await conn.write(m.codec)
|
||||||
handshaked = true
|
handshaked = true
|
||||||
else:
|
else:
|
||||||
|
trace "handle: sending `na` for duplicate handshake while handshaked"
|
||||||
await conn.write(Na)
|
await conn.write(Na)
|
||||||
else:
|
else:
|
||||||
for h in m.handlers:
|
for h in m.handlers:
|
||||||
|
|
Loading…
Reference in New Issue