From b23b4dbd79b4699abde4b3954c7480e137ffc3be Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Thu, 6 Aug 2015 12:27:59 +0200 Subject: p2p/discover: close Table during testing Not closing the table used to be fine, but now the table has a database. --- p2p/discover/table.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'p2p/discover/table.go') 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() } -- cgit v1.2.3