mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-04 15:22:55 +00:00
whisper/whisperv6: fix peer time.Ticker leak (#20520)
This commit is contained in:
parent
50be790869
commit
a013f02df2
1 changed files with 2 additions and 0 deletions
|
|
@ -146,7 +146,9 @@ func (peer *Peer) handshake() error {
|
||||||
func (peer *Peer) update() {
|
func (peer *Peer) update() {
|
||||||
// Start the tickers for the updates
|
// Start the tickers for the updates
|
||||||
expire := time.NewTicker(expirationCycle)
|
expire := time.NewTicker(expirationCycle)
|
||||||
|
defer expire.Stop()
|
||||||
transmit := time.NewTicker(transmissionCycle)
|
transmit := time.NewTicker(transmissionCycle)
|
||||||
|
defer transmit.Stop()
|
||||||
|
|
||||||
// Loop and transmit until termination is requested
|
// Loop and transmit until termination is requested
|
||||||
for {
|
for {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue