Multiselect negotiation failure - what to do?

Hi everybody!

Our team is implementing Libp2p in C++ language, and currently, I am working on the Multiselect protocol. So, a little question has appeared: for example, one node sends all protocols it supports (as a response to ls), and none of them is supported by the other.
What should the other node do? How to say that it is impossible to communicate and close the connection? Send na as a response to ls? Such a case is not documented here, so I am not sure.

Thanks for responses!

Hey @PKotoff, welcome to the forum! :tada:

We are currently a bad citizen and simply close the underlying connection.

go-libp2p doesn’t actually use the ls mechanism AFAIK, but if the connection upgrader fails to set up a secure channel as a result of no protocol intersection, we will simply close the connection:

In the near future, we want to introduce a wire protocol with a DISCONNECT message so we can convey the reason for closure in this case, and many others (e.g. connection manager pruning).

Ok, I understand! Thank you again.