Skip to content

Investigate cause for #580 #620

@marci4

Description

@marci4

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

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions