mirror of
https://github.com/pterodactyl/wings.git
synced 2026-05-01 10:02:43 -05:00
Return context cancelations as a locker locked error
This commit is contained in:
@@ -51,7 +51,9 @@ func (l *Locker) TryAcquire(ctx context.Context) error {
|
||||
return nil
|
||||
case <-ctx.Done():
|
||||
if err := ctx.Err(); err != nil {
|
||||
return err
|
||||
if errors.Is(err, context.DeadlineExceeded) || errors.Is(err, context.Canceled) {
|
||||
return ErrLockerLocked
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user