WebsocketResource: Emit WSREVent.ERROR on Exception

master
Harald Wolff 2019-09-02 12:19:17 +02:00
parent 32c6a8e15d
commit 97a39f4acc
1 changed files with 2 additions and 1 deletions

View File

@ -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);