vacp2p / nim-libp2p

libp2p implementation in Nim
https://vacp2p.github.io/nim-libp2p/docs/
MIT License
240 stars 52 forks source link

Pubsubpeer has wrong protocol codecs #1115

Closed diegomrsantos closed 2 weeks ago

diegomrsantos commented 3 weeks ago

When subscribePeer runs, a remote peer PubSubPeer is created, but with the local peer pubsub.codecs instead of those from the remote one. The remote peer is added to the local peer's peers table. When handleConn executes - now with the right codec - the remote peer continues with the wrong codecs, as it's already present in the table and it isn't created again or modified.