libp2p / js-libp2p

The JavaScript Implementation of libp2p networking stack.
https://libp2p.io
Other
2.27k stars 436 forks source link

fix: Transient connection logic judgment #2547

Closed wlynxg closed 1 month ago

wlynxg commented 1 month ago

Transient connection logic judgment

Description

In go-libp2p, transient connections are judged based on whether the relay node has restrictions on the current connection. Reference code: https://github.com/libp2p/go-libp2p/blob/fccfbe7a4b6841325100038b83f86cd4e097b9a1/p2p/protocol/circuitv2/client/dial.go#L181

This submission aligns js-libp2p logic with go-libp2p logic.

Notes & open questions

Change checklist

achingbrain commented 1 month ago

Thanks for opening this. Please can you add a test to prevent future regressions and ensure linting passes.

wlynxg commented 1 month ago

Thanks for opening this. Please can you add a test to prevent future regressions and ensure linting passes.

Sorry, I'm not very familiar with js, I can't write this test😟

achingbrain commented 1 month ago

Hmm, not sure why that closed this PR. Continued in #2575