JavaEE Websocket: Closing Browser Tab Closes All Sessions Irrespective Of Browser
I have a websocket endpoint as @ServerEndpoint('/tweets') public class TweetStreamServer { private static final Logger LOGGER = LoggerFactory.getLogger(TweetStreamServer.clas
Solution 1:
Instead of using
s.getBasicRemote().sendText(TwitterHoseBird.getMsgQueue().take());
change it to
s.getAsyncRemote().sendText(TwitterHoseBird.getMsgQueue().take());
and everything else would just workout fine
Post a Comment for "JavaEE Websocket: Closing Browser Tab Closes All Sessions Irrespective Of Browser"