472082 - isOpen returns true on CLOSING Connection
+ Minor tweak to test for isOutputAvailable() instead of connection state.
This commit is contained in:
parent
ef067b2624
commit
11b5d320f8
|
@ -242,14 +242,12 @@ public class WebSocketSession extends ContainerLifeCycle implements Session, Inc
|
|||
@Override
|
||||
public RemoteEndpoint getRemote()
|
||||
{
|
||||
ConnectionState state = connection.getIOState().getConnectionState();
|
||||
|
||||
if ((state == ConnectionState.OPEN) || (state == ConnectionState.CONNECTED))
|
||||
if (connection.getIOState().isOutputAvailable())
|
||||
{
|
||||
return remote;
|
||||
}
|
||||
|
||||
throw new WebSocketException("RemoteEndpoint unavailable, current state [" + state + "], expecting [OPEN or CONNECTED]");
|
||||
throw new WebSocketException("RemoteEndpoint unavailable, outgoing connection not open");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue