Skip to content

Commit

Permalink
update(Unicast): remove unnecessary defer
Browse files Browse the repository at this point in the history
  • Loading branch information
b97tsk committed Jun 30, 2024
1 parent 396fef5 commit 13d23e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion unicast.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func (u *unicast[T]) Subscribe(c Context, o Observer[T]) {
u.Mu.Lock()

if u.Observer != nil {
defer u.Mu.Unlock()
u.Mu.Unlock()
o.Error(ErrUnicast)
return
}
Expand Down

0 comments on commit 13d23e6

Please sign in to comment.