Skip to content

Commit

Permalink
Telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
Tratcher committed Nov 14, 2023
1 parent dcedcb8 commit 98e7950
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ internal enum WebSocketCloseReason : int
ServerGracefulClose,
ClientDisconnect,
ServerDisconnect,
ActivityTimeout,
}
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ public WebSocketCloseReason GetCloseReason(HttpContext context)
ForwarderError.UpgradeRequestDestination => WebSocketCloseReason.ServerDisconnect,
ForwarderError.UpgradeResponseDestination => WebSocketCloseReason.ServerDisconnect,

// Activity Timeout
ForwarderError.UpgradeActivityTimeout => WebSocketCloseReason.ActivityTimeout,

// Both sides gracefully closed the underlying connection without sending a WebSocket close,
// or the server closed the connection and we canceled the client and suppressed the errors.
null => WebSocketCloseReason.ServerDisconnect,
Expand Down

0 comments on commit 98e7950

Please sign in to comment.