Skip to content

Commit b153088

Browse files
fix(nodebuilder/p2p): fix autonat == nil panic in test (#4170)
Co-authored-by: Oleg Kovalov <[email protected]>
1 parent b3102dd commit b153088

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

nodebuilder/p2p/reachability.go

+5
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ func reachabilityCheck(ctx context.Context, host HostBase) {
1414
if !ok {
1515
panic("host does not implement autoNatGetter")
1616
}
17+
1718
autoNAT := getter.GetAutoNat()
19+
if autoNAT == nil {
20+
log.Error("autoNAT is nil on host")
21+
return
22+
}
1823

1924
go func() {
2025
ticker := time.NewTicker(reachabilityCheckTick)

0 commit comments

Comments
 (0)