-
Notifications
You must be signed in to change notification settings - Fork 6
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
Connection mgr throws exception when broadcasting to closed connections #11
Comments
Seems like the exception aborts broadcasting, so broadcasting basically breaks until the closed sockets are no longer seen by the broadcast() code. I might be running into this problem because in my example code, onOpen() returns false when the user is not logged in. Returning false prevents the socket from opening, which might leave it closed but not removed from the list of connections. Clue? |
Also, in order to continue working, I restart Lucee (on Windows by restarting the Lucee Service) in order to hopefully clear out the closed websocket connections. However, doing so doesn't always clear this error. Sometimes I need to restart Lucee multiple times, and it's unclear why. But, this may be a clue... its the tail of my catalina log file after stopping the Lucee Service. Looks like there are a couple threads that could be created by the websocket extension that don't stop:
|
This looks like something that Lucee starts, regardless of whether the WebSocket extension is used or not. See if you get a similar error on an Application that doesn't use web sockets. |
Stack trace from zip file:
|
This is fixed in version 2.0.2 |
Hi I am on tomcat / linux / lucee 5 with websocks 2.0.3
i register the socket in the application startup, then on each page request a user who is logged into my app subscribes to a user specific channel (/ws/support/{userid}). The problem i am running into is that same user will get subscribed an infinite number of times. I am not sure how to stop duplicate subscriptions. Thanks in advance |
@chewymole - you can maintain a Struct in the Application scope that will keep track of the |
In debugging a bit more, I tried:
Here is a stack trace:
|
I'm running into an issue where the connection manager is throwing an exception when trying to broadcast to closed connections. After this happens, calling the broadcast() method of the connection manager will always generate an error until tomcat is restarted.
Here's a dump of the error:
error-2017-08-25-11-14-29-2046699486860768.zip
Here's my modified chat app that I'm using for testing, which is throwing the exceptions (note: this error is not exclusive to this app):
chat.zip
The text was updated successfully, but these errors were encountered: