mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-12 13:46:43 +00:00
Other: fix typos regarding listener
This commit is contained in:
@ -72,7 +72,7 @@ func redirectInternetEventsToOneChannel(l listener.Listener) (isInternetOn chan
|
|||||||
const (
|
const (
|
||||||
recheckPortAfter = 50 * time.Millisecond
|
recheckPortAfter = 50 * time.Millisecond
|
||||||
stopPortChecksAfter = 15 * time.Second
|
stopPortChecksAfter = 15 * time.Second
|
||||||
retryListnerAfter = 5 * time.Second
|
retryListenerAfter = 5 * time.Second
|
||||||
)
|
)
|
||||||
|
|
||||||
func monitorInternetConnection(s Server, l listener.Listener) {
|
func monitorInternetConnection(s Server, l listener.Listener) {
|
||||||
@ -89,7 +89,7 @@ func monitorInternetConnection(s Server, l listener.Listener) {
|
|||||||
// blocked our port for a bit after we closed IMAP server
|
// blocked our port for a bit after we closed IMAP server
|
||||||
// due to connection issues.
|
// due to connection issues.
|
||||||
// Restart always helped, so we do retry to not bother user.
|
// Restart always helped, so we do retry to not bother user.
|
||||||
s.ListenRetryAndServe(10, retryListnerAfter)
|
s.ListenRetryAndServe(10, retryListenerAfter)
|
||||||
}()
|
}()
|
||||||
expectedIsPortFree = false
|
expectedIsPortFree = false
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -90,7 +90,7 @@ func (l *listener) Add(eventName string, channel chan<- string) {
|
|||||||
|
|
||||||
log := log.WithField("name", eventName).WithField("i", len(l.channels[eventName]))
|
log := log.WithField("name", eventName).WithField("i", len(l.channels[eventName]))
|
||||||
l.channels[eventName] = append(l.channels[eventName], channel)
|
l.channels[eventName] = append(l.channels[eventName], channel)
|
||||||
log.Debug("Added event listner")
|
log.Debug("Added event listener")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove removes an event listener.
|
// Remove removes an event listener.
|
||||||
|
|||||||
Reference in New Issue
Block a user