p2p/discover: close Table during testing

Not closing the table used to be fine, but now the table has a database.
This commit is contained in:
Felix Lange
2015-08-06 12:27:59 +02:00
parent f12e0161ca
commit b23b4dbd79
2 changed files with 8 additions and 4 deletions

View File

@ -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()
}