core: add missing Timer.Stop call in TestLogReorgs (#20870)

This commit is contained in:
ucwong 2020-04-02 22:04:45 +08:00 committed by GitHub
parent 0c359e4b9a
commit f98cabad7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -973,6 +973,7 @@ func TestLogReorgs(t *testing.T) {
t.Fatalf("failed to insert forked chain: %v", err) t.Fatalf("failed to insert forked chain: %v", err)
} }
timeout := time.NewTimer(1 * time.Second) timeout := time.NewTimer(1 * time.Second)
defer timeout.Stop()
select { select {
case <-done: case <-done:
case <-timeout.C: case <-timeout.C: