Browse Source

fix a potential nil-pointer panic. (#158)

pull/1424/head
Raúl Kripalani 5 years ago
committed by GitHub
parent
commit
029459e4c9
  1. 2
      p2p/transport/quic/filtered_conn.go

2
p2p/transport/quic/filtered_conn.go

@ -51,7 +51,7 @@ func (c *filteredConn) ReadFrom(b []byte) (n int, addr net.Addr, rerr error) {
connAddrs := &connAddrs{lmAddr: c.lmAddr, rmAddr: rmAddr}
if c.gater.InterceptAccept(connAddrs) {
if c.gater != nil && c.gater.InterceptAccept(connAddrs) {
return
}
}

Loading…
Cancel
Save