Skip to content

Commit 33d5b8a

Browse files
authored
fix: subscription logging typo (#174)
1 parent d5f6275 commit 33d5b8a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

subscription.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -490,7 +490,7 @@ func (sc *SubscriptionContext) run() {
490490

491491
if closeStatus < 0 {
492492
sc.Log(err, map[string]any{
493-
"source": "client",
493+
"source": "server",
494494
}, GQL_CONNECTION_ERROR)
495495

496496
continue
@@ -1530,7 +1530,7 @@ func (wh *WebsocketHandler) Ping() error {
15301530

15311531
// Close implements the function to close the websocket connection.
15321532
func (wh *WebsocketHandler) Close() error {
1533-
globalWebSocketStats.AddDeadConnection(wh.id)
1533+
globalWebSocketStats.AddClosedConnection(wh.id)
15341534

15351535
return wh.Conn.Close(websocket.StatusNormalClosure, "close websocket")
15361536
}
@@ -1651,8 +1651,8 @@ func (ws *websocketStats) AddActiveConnection(id uuid.UUID) {
16511651
ws.activeConnectionIDs[id] = true
16521652
}
16531653

1654-
// AddDeadConnection adds an dead connection id to the list.
1655-
func (ws *websocketStats) AddDeadConnection(id uuid.UUID) {
1654+
// AddClosedConnection adds an dead connection id to the list.
1655+
func (ws *websocketStats) AddClosedConnection(id uuid.UUID) {
16561656
ws.sync.Lock()
16571657
defer ws.sync.Unlock()
16581658
delete(ws.activeConnectionIDs, id)

0 commit comments

Comments
 (0)