Fixing close handling
This commit is contained in:
parent
137c6c3f2e
commit
c24b7d83e6
|
@ -136,7 +136,7 @@ public class WebSocketEventDriver implements Parser.Listener
|
|||
}
|
||||
CloseInfo close = new CloseInfo(frame);
|
||||
events.onClose.call(websocket,connection,close.getStatusCode(),close.getReason());
|
||||
return;
|
||||
throw new CloseException(close.getStatusCode(),close.getReason());
|
||||
}
|
||||
case BINARY:
|
||||
{
|
||||
|
@ -278,6 +278,10 @@ public class WebSocketEventDriver implements Parser.Listener
|
|||
}
|
||||
}
|
||||
}
|
||||
catch (CloseException e)
|
||||
{
|
||||
terminateConnection(e.getStatusCode(),e.getMessage());
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
unhandled(t);
|
||||
|
|
Loading…
Reference in New Issue