WebsocketResource: Emit WSREVent.ERROR on Exception
parent
32c6a8e15d
commit
97a39f4acc
|
@ -22,7 +22,7 @@ namespace ln.http.resources.websocket
|
|||
}
|
||||
}
|
||||
|
||||
public enum WSREvent { CONNECT, CLOSE }
|
||||
public enum WSREvent { CONNECT, CLOSE, ERROR }
|
||||
public delegate void WSRConnection(WebsocketResource webSocketResource, WebSocket webSocket, WSREvent ev);
|
||||
|
||||
public class WebsocketResource : Resource
|
||||
|
@ -91,6 +91,7 @@ namespace ln.http.resources.websocket
|
|||
} catch (Exception e)
|
||||
{
|
||||
Logging.Log(e);
|
||||
Connection(this, webSocket, WSREvent.ERROR);
|
||||
}
|
||||
Connection(this, webSocket, WSREvent.CLOSE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue