Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Bugfix #192 client side
Browse files Browse the repository at this point in the history
  • Loading branch information
Jun Chen committed Aug 2, 2018
1 parent 0a08031 commit f03dde8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion config/prifi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CellSizeDown = 17500
RelayWindowSize = 1
DCNetType = "Simple"
EnforceSameVersionOnNodes = false
OverrideLogLevel = 2
OverrideLogLevel = 3
ForceConsoleColor = true
RelayUseOpenClosedSlots = true
RelayUseDummyDataDown = false
Expand Down
9 changes: 5 additions & 4 deletions sda/services/prifi.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ func (s *ServiceState) handleTimeout(lateClients []string, lateTrustees []string
// remain in some weird state)
func (s *ServiceState) NetworkErrorHappened(si *network.ServerIdentity) {
if s.role != prifi_protocol.Relay {
log.Lvl3("A network error occurred with node", si, ", but we're not the relay, nothing to do.")
//s.connectToRelayStopChan <- true //"nothing" except stop this goroutine
log.Lvl3("A network error occurred with node", si, ", we're not the relay, hence we stop the protocol, " +
"but let the connectToRelay goroutine still running.")
s.StopPriFiCommunicateProtocol()
return
}

if s.churnHandler == nil {
log.Fatal("Can't handle a network error without a churnHandler")
}
Expand Down Expand Up @@ -208,7 +210,7 @@ func (s *ServiceState) connectToTrustees(trusteesIDs []*network.ServerIdentity,
}

// connectToRelay sends a connection request to the relay
// every 10 seconds if the node is not participating to
// every 5 seconds if the node is not participating to
// a PriFi protocol.
func (s *ServiceState) connectToRelay(relayID *network.ServerIdentity, stopChan chan bool) {
s.sendConnectionRequest(relayID)
Expand Down Expand Up @@ -243,7 +245,6 @@ func (s *ServiceState) sendConnectionRequest(relayID *network.ServerIdentity) {
log.Lvl3("Connection to relay failed. (I'm a trustee at address", s, ")")
} else {
log.Lvl3("Connection to relay failed. (I'm a client at address", s, ")")

}
}
}
Expand Down

0 comments on commit f03dde8

Please sign in to comment.