Commit a013f02d authored by wangxiang's avatar wangxiang Committed by Felix Lange

whisper/whisperv6: fix peer time.Ticker leak (#20520)

parent 50be7908
...@@ -146,7 +146,9 @@ func (peer *Peer) handshake() error { ...@@ -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 {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment