Skip to content
This repository has been archived by the owner on May 26, 2022. It is now read-only.

Commit

Permalink
fix a potential nil-pointer panic. (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
raulk authored May 22, 2020
1 parent 51f45f6 commit eda7485
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filtered_conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down

0 comments on commit eda7485

Please sign in to comment.