fix: adding mutex
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
custom_rwmutex "git.neurocipta.com/rogerferdinan/custom-rwmutex"
|
||||
customrwmutex "git.neurocipta.com/rogerferdinan/custom-rwmutex"
|
||||
safemap "git.neurocipta.com/rogerferdinan/safe-map"
|
||||
"git.neurocipta.com/rogerferdinan/safe-web-socket/internal"
|
||||
"github.com/gorilla/websocket"
|
||||
@@ -131,7 +131,7 @@ func (b *SafeWebsocketClientBuilder) Build(ctx context.Context) (*SafeWebsocketC
|
||||
path: b.path,
|
||||
rawQuery: b.rawQuery,
|
||||
dataChannel: make(chan []byte, *b.channelSize),
|
||||
mu: custom_rwmutex.NewCustomRwMutex(),
|
||||
mu: customrwmutex.NewCustomRwMutex(),
|
||||
ctx: ctx,
|
||||
reconnectCh: make(chan struct{}, 1),
|
||||
isConnected: false,
|
||||
@@ -158,7 +158,7 @@ type SafeWebsocketClient struct {
|
||||
path *string
|
||||
rawQuery *string
|
||||
|
||||
mu *custom_rwmutex.CustomRwMutex
|
||||
mu *customrwmutex.CustomRwMutex
|
||||
conn *websocket.Conn
|
||||
ctx context.Context
|
||||
cancelFuncs []context.CancelFunc
|
||||
|
||||
Reference in New Issue
Block a user