Skip to content

Commit

Permalink
Graceful shutdown if node is not reachable
Browse files Browse the repository at this point in the history
  • Loading branch information
wizeguyy committed Sep 18, 2023
1 parent a7e6c45 commit 9213b86
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion p2p/nat/nat.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
"errors"
"fmt"
"net"
"os"
"strings"
"sync"
"time"
Expand Down Expand Up @@ -153,7 +154,10 @@ func Any() Interface {
return c
}
}
panic("please enable upnp or natpmp on the router to join the network")
log.Error("This computer is not publicly recahable and cannot join the P2P network.")
fmt.Println("Please forward the necessary ports or enable UPnP on your router. See https://docs.quai.network for guidance.")
os.Exit(1)
return nil
})
}

Expand Down

0 comments on commit 9213b86

Please sign in to comment.