Added checking for not reusing a session
This commit is contained in:
parent
0ef002be52
commit
6f5709472d
@ -305,6 +305,13 @@ namespace WebSocketSharp.Server
|
|||||||
|
|
||||||
internal void Start (WebSocketContext context, WebSocketSessionManager sessions)
|
internal void Start (WebSocketContext context, WebSocketSessionManager sessions)
|
||||||
{
|
{
|
||||||
|
if (_websocket != null) {
|
||||||
|
_websocket.Log.Error ("This session has already been started.");
|
||||||
|
context.WebSocket.Close (HttpStatusCode.ServiceUnavailable);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
_context = context;
|
_context = context;
|
||||||
_sessions = sessions;
|
_sessions = sessions;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user