contact retry force disconnect internally any connecting over 2xcircut timeout #521

Merged
sarah merged 1 commits from crForceDisconn into master 2023-07-25 21:22:39 +00:00
Owner
No description provided.
sarah reviewed 2023-07-20 20:06:14 +00:00
@ -215,0 +217,4 @@
p := v.(*contact)
if p.state == connections.CONNECTING && time.Now().Sub(p.lastAttempt) > time.Duration(circuitTimeoutSecs)*time.Second*2 {
// we have been "connecting" for twice the circuttimeout so it's failed, we just didn't learn about it, manually disconnect
cr.handleEvent(p.id, connections.DISCONNECTED, p.ctype)
Owner

this needs to log an Error. In normal operation this should not happen, and very likely indicates a failure to handle a missing connection issue somewhere else.

this needs to log an Error. In normal operation this should not happen, and very likely indicates a failure to handle a missing connection issue somewhere else.
dan marked this conversation as resolved
dan force-pushed crForceDisconn from bd2582f8f1 to 7c3e10cdb7 2023-07-21 03:53:27 +00:00 Compare
sarah approved these changes 2023-07-21 04:04:32 +00:00
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch/196
decentral1se reviewed 2023-07-21 12:26:07 +00:00
@ -215,0 +218,4 @@
if p.state == connections.CONNECTING && time.Now().Sub(p.lastAttempt) > time.Duration(circuitTimeoutSecs)*time.Second*2 {
// we have been "connecting" for twice the circuttimeout so it's failed, we just didn't learn about it, manually disconnect
cr.handleEvent(p.id, connections.DISCONNECTED, p.ctype)
log.Errorf("had to manually set peer %v of profile %v to DISCONNECTED for connecting for 2xcircutTimeout (%v) seconds", p.id, cr.onion, circuitTimeoutSecs*2)
First-time contributor

for connecting for 2xcircutTimeout -> due to a circuit timeout perhaps? circut has a typo also.

`for connecting for 2xcircutTimeout` -> `due to a circuit timeout` perhaps? `circut` has a typo also.
dan marked this conversation as resolved
dan force-pushed crForceDisconn from 7c3e10cdb7 to 33ef2e8b23 2023-07-25 19:57:12 +00:00 Compare
sarah force-pushed crForceDisconn from 33ef2e8b23 to 93b1760c32 2023-07-25 19:58:16 +00:00 Compare
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch/206
Member
Drone Build Status: failure https://build.openprivacy.ca/cwtch.im/cwtch/207
dan force-pushed crForceDisconn from 93b1760c32 to fb22efac1f 2023-07-25 20:02:22 +00:00 Compare
Member
Drone Build Status: success https://build.openprivacy.ca/cwtch.im/cwtch/208
sarah force-pushed crForceDisconn from fb22efac1f to 1f2617e4ae 2023-07-25 21:22:33 +00:00 Compare
sarah merged commit b27229091a into master 2023-07-25 21:22:39 +00:00
Sign in to join this conversation.
No description provided.