Mantis - Resin
Viewing Issue Advanced Details
6339 minor always 04-06-20 03:10 06-16-20 16:21
samadams  
ferg  
normal  
closed 4.0.64  
fixed  
none    
none 4.0.65  
0006339: Websocket sometimes sends duplicate first message
I have a websocket server using resin that sends an incrementing sequence to a client, which the client then echos back.

We've found a strange issue - occasionally the first message being sent from the server gets duplicated.

I've added logging where we call WebSocketContext.startTextMessage() that shows we only write the message once, but a tcpdump shows that the server actually sent the message twice.

The attached code reproduces the issue. If you deploy the TestWebsocketServlet and leave the html page running for a few minutes it will detect the issue.
 wstest.zip [^] (2,429 bytes) 04-06-20 03:10

There are no notes attached to this issue.