forked from Silverfish/proton-bridge
fix(GODT-2774): Add external context to telemetry tasks
This ensures they get cancelled if the parent context becomes invalid
This commit is contained in:
@ -76,7 +76,7 @@ func newIMAPConnector(user *User, addrID string) *imapConnector {
|
||||
}
|
||||
|
||||
// Authorize returns whether the given username/password combination are valid for this connector.
|
||||
func (conn *imapConnector) Authorize(username string, password []byte) bool {
|
||||
func (conn *imapConnector) Authorize(ctx context.Context, username string, password []byte) bool {
|
||||
addrID, err := conn.CheckAuth(username, password)
|
||||
if err != nil {
|
||||
return false
|
||||
@ -86,7 +86,7 @@ func (conn *imapConnector) Authorize(username string, password []byte) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
conn.User.SendConfigStatusSuccess()
|
||||
conn.User.SendConfigStatusSuccess(ctx)
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user