(interval time.Duration)
| 378 | } |
| 379 | |
| 380 | func (peer *Peer) SetPersistentKeepaliveInterval(interval time.Duration) { |
| 381 | old := peer.persistentKeepaliveInterval.Swap(uint32(interval.Seconds())) |
| 382 | |
| 383 | // Send immediate keepalive if we're turning it on and before it wasn't on. |
| 384 | if old == 0 && interval.Seconds() != 0 { |
| 385 | peer.SendKeepalive() |
| 386 | peer.SendStagedPackets() |
| 387 | } |
| 388 | } |
nothing calls this directly
no test coverage detected