rename .mu -> .closeMutex
This commit is contained in:
@@ -39,7 +39,7 @@ func (s Status) String() string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type Relay struct {
|
type Relay struct {
|
||||||
mu sync.Mutex
|
closeMutex sync.Mutex
|
||||||
|
|
||||||
URL string
|
URL string
|
||||||
RequestHeader http.Header // e.g. for origin header
|
RequestHeader http.Header // e.g. for origin header
|
||||||
@@ -555,8 +555,8 @@ func (r *Relay) Count(ctx context.Context, filters Filters, opts ...Subscription
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (r *Relay) Close() error {
|
func (r *Relay) Close() error {
|
||||||
r.mu.Lock()
|
r.closeMutex.Lock()
|
||||||
defer r.mu.Unlock()
|
defer r.closeMutex.Unlock()
|
||||||
|
|
||||||
if r.connectionContextCancel == nil {
|
if r.connectionContextCancel == nil {
|
||||||
return fmt.Errorf("relay not connected")
|
return fmt.Errorf("relay not connected")
|
||||||
|
|||||||
Reference in New Issue
Block a user