aboutsummaryrefslogtreecommitdiffstats
path: root/p2p/discover/table.go
diff options
context:
space:
mode:
Diffstat (limited to 'p2p/discover/table.go')
-rw-r--r--p2p/discover/table.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/p2p/discover/table.go b/p2p/discover/table.go
index 48c473475..67f7ec46f 100644
--- a/p2p/discover/table.go
+++ b/p2p/discover/table.go
@@ -164,7 +164,9 @@ func randUint(max uint32) uint32 {
// Close terminates the network listener and flushes the node database.
func (tab *Table) Close() {
- tab.net.close()
+ if tab.net != nil {
+ tab.net.close()
+ }
tab.db.close()
}