Description
The bug is stably reproduced!
Version 0.41.1.
I can do this:
m.host.Connect(m.ctx, peerServer)
No error is returned.
And then I immediately do:
stream, err = m.host.NewStream(network.WithAllowLimitedConn(m.ctx, protocol), id, protocol)
and I get the error: connection failed
This lasts indefinitely. Until I restart the application completely.
This is a connection between nodes with white ip addresses.
Upd: And I've even found what causes the error:
I have another app running on the same device, with a different host id, which is also already successfully connected to the same host (which I can't connect to). The same DHT prefix is used.
The error occurs in protocol identification here:
go-libp2p/p2p/protocol/identify/id.go
Line 490 in 853011a
The error is returned by the library go-multistream 0.6.0
Error text:
Application error 0x1001 (remote)
If I shut down an application that is successfully connected, the error goes away.
What to do? How to fix the error?