diff options
author | Felix Lange <fjl@twurst.com> | 2015-08-06 18:27:59 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-08-06 18:27:59 +0800 |
commit | b23b4dbd79b4699abde4b3954c7480e137ffc3be (patch) | |
tree | 1beb39cdac5852350613680cb863829e370decdc /p2p/discover/table.go | |
parent | f12e0161ca7ed2bc5034a7b4904e1b5032e41fe7 (diff) | |
download | go-tangerine-b23b4dbd79b4699abde4b3954c7480e137ffc3be.tar go-tangerine-b23b4dbd79b4699abde4b3954c7480e137ffc3be.tar.gz go-tangerine-b23b4dbd79b4699abde4b3954c7480e137ffc3be.tar.bz2 go-tangerine-b23b4dbd79b4699abde4b3954c7480e137ffc3be.tar.lz go-tangerine-b23b4dbd79b4699abde4b3954c7480e137ffc3be.tar.xz go-tangerine-b23b4dbd79b4699abde4b3954c7480e137ffc3be.tar.zst go-tangerine-b23b4dbd79b4699abde4b3954c7480e137ffc3be.zip |
p2p/discover: close Table during testing
Not closing the table used to be fine, but now the table has a database.
Diffstat (limited to 'p2p/discover/table.go')
-rw-r--r-- | p2p/discover/table.go | 4 |
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() } |