mirror of https://github.com/vacp2p/nim-libp2p.git
TcpTransport.listen(): enable SO_REUSEADDR
in order to avoid failures when restarting the process while the OS is keeping open sockets from previous runs
This commit is contained in:
parent
1efada474c
commit
125843af7d
|
@ -127,7 +127,7 @@ method listen*(t: TcpTransport,
|
|||
discard await procCall Transport(t).listen(ma, handler) # call base
|
||||
|
||||
## listen on the transport
|
||||
t.server = createStreamServer(t.ma, connCb, {}, t)
|
||||
t.server = createStreamServer(t.ma, connCb, {ReuseAddr}, t)
|
||||
t.server.start()
|
||||
|
||||
# always get the resolved address in case we're bound to 0.0.0.0:0
|
||||
|
|
Loading…
Reference in New Issue