Skip to content

Investigate cause for #580 #620

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

Closed
marci4 opened this issue Nov 21, 2017 · 1 comment · Fixed by #628
Closed

Investigate cause for #580 #620

marci4 opened this issue Nov 21, 2017 · 1 comment · Fixed by #628
Assignees
Milestone

Comments

@marci4
Copy link
Collaborator

marci4 commented Nov 21, 2017

Find out the cause and a workaround for #580

Expected Behavior

No thread should be running!

Current Behavior

WebSocketServer.stop() is most likely to fast for the socket
WebSocketServer.stop(timeout) has no effect

Possible Solution

Steps to Reproduce (for bugs)

  1. Run Issue580Test multiple times

Debug log (for bugs)

Connection lost timer started
write(154): {GET / HTTP/1.1
Connection: Upgrade
Host: localhost:16743
Sec-WebSocket-Key: 4yYtzNPhTBaHmHfAEJkwhw==
Sec-WebSocket-Version: 13
Upgrade: websocket

}
process(154): {GET / HTTP/1.1
Connection: Upgrade
Host: localhost:16743
Sec-WebSocket-Key: 4yYtzNPhTBaHmHfAEJkwhw==
Sec-WebSocket-Version: 13
Upgrade: websocket

}
write(212): {HTTP/1.1 101 Web Socket Protocol Handshake
Connection: Upgrade
Date: Tue, 21 Nov 2017 20:26:39 GMT
Sec-WebSocket-Accept: diOQ9h4YJOQF4MkREFq/U6mObOo=
Server: TooTallNate Java-WebSocket
Upgrade: websocket

}
open using draft: Draft_6455 extension: DefaultExtension protocol: 
process(212): {HTTP/1.1 101 Web Socket Protocol Handshake
Connection: Upgrade
Date: Tue, 21 Nov 2017 20:26:39 GMT
Sec-WebSocket-Accept: diOQ9h4YJOQF4MkREFq/U6mObOo=
Server: TooTallNate Java-WebSocket
Upgrade: websocket

}
open using draft: Draft_6455 extension: DefaultExtension protocol: 
Connection lost timer started
send frame: Framedata{ optcode:TEXT, fin:true, rsv1:false, rsv2:false, rsv3:false, payloadlength:[pos:0, len:4], payload:test}
afterEnconding(4): {test}
write(10): {��:I�8N,�L}
process(10): {��:I�8N,�L}
afterDecoding(4): {test}
matched frame: Framedata{ optcode:TEXT, fin:true, rsv1:false, rsv2:false, rsv3:false, payloadlength:[pos:0, len:4], payload:test}
send frame: Framedata{ optcode:CLOSING, fin:true, rsv1:false, rsv2:false, rsv3:false, payloadlength:[pos:0, len:2], payload:��}code: 1001
afterEnconding(2): {��}
write(4): {����}
Connection lost timer stopped

Your Environment

  • Version used: 1.3.7-dev
  • Java version: 1.8
  • Operating System and version: Windows 10
  • Endpoint Name and version: Java-WebSocket Client
@marci4 marci4 self-assigned this Nov 21, 2017
@marci4
Copy link
Collaborator Author

marci4 commented Nov 21, 2017

Calling selectorthread.interrupt() will of course stop the sending the messages...

@marci4 marci4 mentioned this issue Nov 22, 2017
8 tasks
marci4 added a commit to marci4/Java-WebSocket-Dev that referenced this issue Nov 30, 2017
This should solve the issue TooTallNate#620
@marci4 marci4 mentioned this issue Nov 30, 2017
8 tasks
@marci4 marci4 added this to the Release 1.3.7 milestone Nov 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant