Skip to content

Commit

Permalink
rename .mu -> .closeMutex
Browse files Browse the repository at this point in the history
  • Loading branch information
fiatjaf committed Nov 5, 2023
1 parent 20d65d4 commit f6df0f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func (s Status) String() string {
}

type Relay struct {
mu sync.Mutex
closeMutex sync.Mutex

URL string
RequestHeader http.Header // e.g. for origin header
Expand Down Expand Up @@ -555,8 +555,8 @@ func (r *Relay) Count(ctx context.Context, filters Filters, opts ...Subscription
}

func (r *Relay) Close() error {
r.mu.Lock()
defer r.mu.Unlock()
r.closeMutex.Lock()
defer r.closeMutex.Unlock()

if r.connectionContextCancel == nil {
return fmt.Errorf("relay not connected")
Expand Down

0 comments on commit f6df0f3

Please sign in to comment.