mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-10 20:56:51 +00:00
Other(refactor): Remove always-nil return value of (*Bridge).Close
This commit is contained in:
@ -109,12 +109,8 @@ func withBridge( //nolint:funlen
|
||||
return fmt.Errorf("could not create bridge: %w", err)
|
||||
}
|
||||
|
||||
// Close the bridge when we exit.
|
||||
defer func() {
|
||||
if err := bridge.Close(c.Context); err != nil {
|
||||
logrus.WithError(err).Error("Failed to close bridge")
|
||||
}
|
||||
}()
|
||||
// Ensure we close bridge when we exit.
|
||||
defer bridge.Close(c.Context)
|
||||
|
||||
return fn(bridge, eventCh)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user