More network check events #283
No reviewers
Labels
No Label
applications
BLOCKED
bug
design
duplicate
enhancement
fixed?
funding-needed
help wanted
infrastructure
invalid
payments
qubes
question
ready-for-implementation
refactor
spam
tapir-server
testing
tor
wontfix
No Milestone
No Assignees
3 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cwtch.im/cwtch#283
Loading…
Reference in New Issue
No description provided.
Delete Branch "plugin"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/680
@ -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:
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"}))
even more flood
maybe track last state emmited and only emit if it changes
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/682
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/684
Drone Build Status: success
https://build.openprivacy.ca/cwtch.im/cwtch/686