mirror of
https://github.com/status-im/go-libp2p-webrtc-direct.git
synced 2025-01-31 16:05:44 +00:00
use the manet dial args in order to figure out the listener
This commit is contained in:
parent
006488daf2
commit
e838527c2c
@ -21,8 +21,12 @@ type Listener struct {
|
||||
}
|
||||
|
||||
func newListener(config *connConfig) (*Listener, error) {
|
||||
lnet, lnaddr, err := manet.DialArgs(config.maAddr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ln, err := net.Listen(config.addr.Network(), config.addr.String())
|
||||
ln, err := net.Listen(lnet, lnaddr)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to listen: %v", err)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user