Skip to content

Commit

Permalink
[fix] deadlock in WG keys manager
Browse files Browse the repository at this point in the history
  • Loading branch information
stenya committed Feb 5, 2024
1 parent 20c75d1 commit e7b2412
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion daemon/service/wgkeys/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ func (m *KeysManager) generateKeys(onlyUpdateIfNecessary bool) (retErr error) {
var e types.APIError
if errors.As(err, &e) {
if e.ErrorCode == types.SessionNotFound {
m.service.OnSessionNotFound()
go m.service.OnSessionNotFound() // run in routine to avoid deadlock
return fmt.Errorf("WG keys not updated (session not found)")
}
}
Expand Down

0 comments on commit e7b2412

Please sign in to comment.