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