More network check events #283

Manually merged
dan merged 1 commits from plugin into master 2019-11-04 21:35:19 +00:00
Owner
No description provided.
dan was assigned by sarah 2019-11-04 20:20:24 +00:00
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/680
dan requested changes 2019-11-04 21:28:28 +00:00
@ -48,6 +51,15 @@ func (nc *networkCheck) run() {
case event.ProtocolEngineStartListen:
log.Debugf("initiating connection check for %v", e.Data[event.Onion])
nc.onionsToCheck = append(nc.onionsToCheck, e.Data[event.Onion])
case event.PeerStateChange:
Owner

no default fallthrough in go

no default fallthrough in go
@ -51,0 +58,4 @@
connectionState := e.Data[event.ConnectionState]
if connectionState == connections.ConnectionStateName[connections.AUTHENTICATED] || connectionState == connections.ConnectionStateName[connections.CONNECTED] {
lastMessageReceived = time.Now()
nc.bus.Publish(event.NewEvent(event.NetworkStatus, map[event.Field]string{event.Error: "", event.Status: "Success"}))
Owner

even more flood
maybe track last state emmited and only emit if it changes

even more flood maybe track last state emmited and only emit if it changes
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/682
dan closed this pull request 2019-11-04 21:35:19 +00:00
dan closed this pull request 2019-11-04 21:35:19 +00:00
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/684
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/686
Sign in to join this conversation.
No description provided.