Skip to content

Commit

Permalink
fix(network): mdns deadlock
Browse files Browse the repository at this point in the history
Signed-off-by: Godefroy Ponsinet <godefroy.ponsinet@outlook.com>
  • Loading branch information
90dy committed Mar 21, 2019
1 parent d7ee578 commit 1a9044d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/network/protocol/mdns/discovery.go
Expand Up @@ -55,6 +55,8 @@ func (d *Discovery) wakeService(ctx context.Context, ns string) error {
var err error

d.mutex.Lock()
defer d.mutex.Unlock()

_, ok := d.services[ns]
if ok {
return nil
Expand All @@ -72,7 +74,6 @@ func (d *Discovery) wakeService(ctx context.Context, ns string) error {
}
d.services[ns].RegisterNotifee(d.notifees[ns])
}
d.mutex.Unlock()

return nil
}
Expand Down

0 comments on commit 1a9044d

Please sign in to comment.