Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception on Socket.close() #159

Open
tolotos-rgu opened this issue Dec 11, 2018 · 0 comments
Open

Exception on Socket.close() #159

tolotos-rgu opened this issue Dec 11, 2018 · 0 comments

Comments

@tolotos-rgu
Copy link

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]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant