git rid of heartbeater goroutine
...by moving the logic into the connection actor goroutine. The heartbeater goroutine was doing a lot more than just heartbeating; namely it also had tickers for triggering a ProtocolFetchAll and initiating a fragmentation test. Furhermore, ensureHeartbeats also spawned the forwarders. So this was quite a mix of functionality, and, furthermore, most of it related quite closely to the connection actor. So moving the functionality into that simplifies the code. In the process we also fix #294.
This commit is contained in:
1 parent
ad67dc5d07
commit
e850127ed4
3 files changed
+62
-73
No files matched your search
+3
-1
@@ -67,7 +67,9 @@ type LocalConnection struct {
|
||||
stackFrag bool
|
||||
effectivePMTU int
|
||||
SessionKey *[32]byte
|
||||
heartbeatStop chan<- interface{}
|
||||
heartbeat *time.Ticker
|
||||
fetchAll *time.Ticker
|
||||
fragTest *time.Ticker
|
||||
forwardChan chan<- *ForwardedFrame
|
||||
forwardChanDF chan<- *ForwardedFrame
|
||||
stopForward chan<- interface{}
|
||||
|
||||
Reference in new issue
Block a user