mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-15 14:56:42 +00:00
Tests and final touches
This commit is contained in:
@ -132,7 +132,9 @@ func (cm *ClientManager) noConnection() {
|
||||
}
|
||||
|
||||
cm.log.Warn("Connection lost")
|
||||
cm.config.ConnectionOffHandler()
|
||||
if cm.config.ConnectionOffHandler != nil {
|
||||
cm.config.ConnectionOffHandler()
|
||||
}
|
||||
cm.connectionOff = true
|
||||
|
||||
go func() {
|
||||
@ -141,7 +143,9 @@ func (cm *ClientManager) noConnection() {
|
||||
|
||||
if err := cm.CheckConnection(); err == nil {
|
||||
cm.log.Info("Connection re-established")
|
||||
cm.config.ConnectionOnHandler()
|
||||
if cm.config.ConnectionOnHandler != nil {
|
||||
cm.config.ConnectionOnHandler()
|
||||
}
|
||||
cm.connectionOff = false
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user