https://bz.apache.org/bugzilla/show_bug.cgi?id=58520

            Bug ID: 58520
           Summary: Future returned by
                    javax.websocket.Session.getAsyncRemote().sendText(...)
                    always returns true
           Product: Tomcat 8
           Version: 8.0.27
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P2
         Component: WebSocket
          Assignee: dev@tomcat.apache.org
          Reporter: jeperjaperjie...@gmail.com

In our websocket implementation, we are sending events through websockets every
250ms to the client.

It seems that the Future<Void> returned by
javax.websocket.Session.getAsyncRemote().sendText(...) always returns true.
This makes it impossible to cancel pending outgoing data.

Scenario:

1. Server is up and running
2. Client connects
3. Server starts sending events every 250ms
4. All goes well
5. Client disconnects from the network (for example by unplugging its UTP)
6. Server keeps sending events; the server has no idea that the client is
disconnected (which is OK, on itself)
7. Twenty seconds later, clients reconnects to network
8. Clients receives all events from the last 20 seconds (around 80 events)

Ideally, during step 6, the server notices that there is a previous pending
event, which can be canceled in favor of the current/new event. With that
approach, the client will not receive all past events at step 8.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to