Community
Participate
Working Groups
Build Identifier: 7.1.3.v20100526 Calling disconnect() on a Websocket.Outbound instance causes NPE when an attempt is made to flush a null buffer. Here are the top few lines of the stack trace... java.lang.NullPointerException at org.eclipse.jetty.websocket.WebSocketGenerator.expelBuffer(WebSocketGenerator.java:138) at org.eclipse.jetty.websocket.WebSocketGenerator.flush(WebSocketGenerator.java:110) at org.eclipse.jetty.websocket.WebSocketConnection.disconnect(WebSocketConnection.java:191) at ... Simply changing WebSocketGenerator.flush(long) to the following may be enough to fix it: public synchronized int flush(long blockFor) throws IOException { if (_buffer==null) return 0; return expelBuffer(blockFor); } Reproducible: Always
fixed in r1996. thanks for the report.