Skip to content

Commit 88578ee

Browse files
committed
fix(mempool): close previous connection on Start() restart
Signed-off-by: cryptodj413 <shinjirohara2@gmail.com>
1 parent d630d75 commit 88578ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

input/mempool/mempool.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,10 @@ func (m *Mempool) Start() error {
6868
close(m.doneChan)
6969
m.wg.Wait()
7070
}
71+
if m.oConn != nil {
72+
_ = m.oConn.Close()
73+
m.oConn = nil
74+
}
7175
if m.eventChan != nil {
7276
close(m.eventChan)
7377
m.eventChan = nil

0 commit comments

Comments
 (0)