Skip to content

Double lock in digest #77

@Helyk

Description

@Helyk

Hello. I have ran into a problem where in digest.go#L262 da.Purge is called while da.mutex is locked, with da.Purge itself trying to acquire lock on it.

This causes double lock and all further digest authentication requests hang until they time out.

This can be fixed either by removing lines 74, 75, 92 and 99, so that da.Purge is always called when da.mutex is locked but is not trying to acquire lock itself, or by adding da.mutex.Unlock() and da.mutex.Lock() around line 262 so that da.Purge is only called when da.mutex is not locked.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions