code: func IsSessionClosed(err error) bool {
  	switch err {
  	case ErrSessionClosed, sockjs.ErrSessionNotOpen, websocket.ErrCloseSent:
  		return true
  	}
  	if e, ok := err.(*ErrSession); ok && e.State > sockjs.SessionActive {
  		return true
  	}
  	_, ok := err.(*websocket.CloseError)
  	return ok
  }
docs: // IsSessionClosed tests whether given error is caused
  // by a closed session.