Close the web socket after sending a close frame.
Previously, the underlying socket was being closed with the cancel call. Because the socket was closed, the close frame could never be sent.
This commit is contained in:
@@ -190,9 +190,6 @@ public class WebSocket extends Transport {
|
||||
}
|
||||
|
||||
protected void doClose() {
|
||||
if (wsCall != null) {
|
||||
wsCall.cancel();
|
||||
}
|
||||
if (ws != null) {
|
||||
try {
|
||||
ws.close(1000, "");
|
||||
@@ -202,6 +199,9 @@ public class WebSocket extends Transport {
|
||||
// websocket already closed
|
||||
}
|
||||
}
|
||||
if (wsCall != null) {
|
||||
wsCall.cancel();
|
||||
}
|
||||
}
|
||||
|
||||
protected String uri() {
|
||||
|
||||
Reference in New Issue
Block a user