Skip to content

Some problems I found with multiple socket connections #13

@DrunkenMoose

Description

@DrunkenMoose

Hey,

First off all thanks for this library to use websockets within lucee! I find this new technique very interesting and making my own chat that I can integrate with different modules is very handy. I got myself into some trouble installing the websockets. I'm also made this thread: https://stackoverflow.com/questions/46489727/lucee-5-0-websocket-outside-localhost a while back. After opening port 8888 it started to work. Now I ran into another problem and thought maybe you can shine some light on it. Let me first explain how I constructed this.

  • We run one Lucee server with a folder with all the made applications. A couple of applications are made public with IIS with their own domain. These applications also contain the chat with the websockets.
  • I installed the websocket library in this lucee instance, with tomcat as java server.
  • I followed your chat example how to construct a framework like this.
  • When accessing the login screen of one of the open applications it registers the websocket on it's own 'parent' channel. Like this: WebsocketRegister("/ws/chat_corecdev/{channel}", new "connectors/ChatListener"()); With chat_corecdev as parent channel. I did this because I think it gives trouble if you register multiple websockets on the same parent channel?
  • When you access the chat room it opens multi active rooms, so also multiple open connections. All on their own channel.
  • I made a lot of javascript code to make a working chat with all of it's possibilities, like smileys and documents etc.

Now I come across a problem that when the last active chat room is being called, gives weird response. It says that it's open, but if you try to send a message it does nothing.

After that I found that in an earlier message I got the following error:

The websocket session [156] has been closed (can only call close)

Now I thought maybe do I need to manually close the sessions? Because when I restart the whole server (where lucee is installed) it works again for all the active chat rooms. So it must be something with the websocket. And is websocket session [156] number 156 of the sessions? I only work with 3 different active channels so that must be weird then.

Also another small thing I found is that when you restart lucee itself, it gives a 500 server error on all the websocket channels. Don't know what that's about.

Hope you can help me out, if I can get it a bit more stable then this works amazing.
Thanks!
Roland M

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions