Skip to content

Exception on Socket.close() #159

@tolotos-rgu

Description

@tolotos-rgu

Hi,
I create the socket like this

AtmosphereClient client = ClientFactory.getDefault().newClient(AtmosphereClient.class);
RequestBuilder request = client.newRequestBuilder()
.method(Request.METHOD.GET)
.uri(endpointURI.toString())
.trackMessageLength(true)
.transport(Request.TRANSPORT.WEBSOCKET);
_socket = client.create();

If I try to close the socket if no longer needed with

_socket.close();

I get a exception:

632 [main] DEBUG com.ning.http.client.AsyncCompletionHandlerBase - No WebSocketUpgradeHandler but scheme is ws
java.lang.IllegalArgumentException: No WebSocketUpgradeHandler but scheme is ws
at com.ning.http.client.providers.netty.request.NettyRequestSender.validateWebSocketRequest(NettyRequestSender.java:501)
at com.ning.http.client.providers.netty.request.NettyRequestSender.sendRequest(NettyRequestSender.java:100)
at com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(NettyAsyncHttpProvider.java:87)
at com.ning.http.client.AsyncHttpClient.executeRequest(AsyncHttpClient.java:506)
at com.ning.http.client.AsyncHttpClient$BoundRequestBuilder.execute(AsyncHttpClient.java:229)
at org.atmosphere.wasync.impl.AtmosphereSocket.doCloseRequest(AtmosphereSocket.java:67)
at org.atmosphere.wasync.impl.AtmosphereSocket.close(AtmosphereSocket.java:115)

634 [main] DEBUG org.atmosphere.wasync.impl.AtmosphereSocket - Was unable to send the close request [89f53258-6e88-4f5b-b09e-5cead6bd4115]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions