Skip to content

Commit

Permalink
fix(firewall/logs): improved logging when firewall is reconnecting
Browse files Browse the repository at this point in the history
  • Loading branch information
sniirful committed Apr 5, 2024
1 parent 45ab184 commit b1d0f0c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firewall/services/services.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,13 +134,13 @@ func LoadCerberoSocket(ip string, port int, attempt int) error {
waitTime := math.Min(float64(attempt)*2, 30)
logs.PrintError(fmt.Sprintf("Connection failed. Waiting %v seconds before trying again...", waitTime))
time.Sleep(time.Duration(waitTime) * time.Second)
logs.PrintInfo("Attempting reconnection...")
logs.PrintDebug("Attempting reconnection...")
LoadCerberoSocket(ip, port, attempt+1)
return nil
}
return err
}
logs.PrintDebug(fmt.Sprintf(`Connected to socket at "%v:%v".`, ip, port))
logs.PrintInfo(fmt.Sprintf(`Connected to socket at "%v:%v".`, ip, port))

logs.PrintDebug(`Sending first byte to socket...`)
conn.Write([]byte(socketInitializationString))
Expand Down

0 comments on commit b1d0f0c

Please sign in to comment.