MCPcopy Create free account
hub / github.com/koding/kite / IsSessionClosed

Function IsSessionClosed

sockjsclient/sockjsclient.go:60–70  ·  view source on GitHub ↗

IsSessionClosed tests whether given error is caused by a closed session.

(err error)

Source from the content-addressed store, hash-verified

58// IsSessionClosed tests whether given error is caused
59// by a closed session.
60func IsSessionClosed(err error) bool {
61 switch err {
62 case ErrSessionClosed, sockjs.ErrSessionNotOpen, websocket.ErrCloseSent:
63 return true
64 }
65 if e, ok := err.(*ErrSession); ok && e.State > sockjs.SessionActive {
66 return true
67 }
68 _, ok := err.(*websocket.CloseError)
69 return ok
70}
71
72// WebsocketSession represents a sockjs.Session over
73// a websocket connection.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected