We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7e7d60c commit 03de100Copy full SHA for 03de100
1 file changed
v2/pkg/engine/datasource/graphql_datasource/subscriptionclient/transport/ws_transport.go
@@ -80,6 +80,14 @@ type WSTransport struct {
80
ctx context.Context
81
opts WSTransportOptions
82
83
+ // mu guards both dialing and conns.
84
+ //
85
+ // dialing coalesces concurrent dial attempts: waiters block on
86
+ // dialResult.done rather than each dialing independently.
87
88
+ // conns holds only fully established connections (dial + protocol init
89
+ // complete) so every entry is always fully usable, never in a partial
90
+ // ready state.
91
mu sync.Mutex
92
dialing map[uint64]*dialResult
93
conns map[uint64]*wsConnection
0 commit comments