Closed olivierlambert closed 1 year ago
Actually it's not the program, it's the server closing the connection.
Are you behind a proxy? Many proxies are configured to close a websocket connection after a few minutes of inactivity. One could implement a heart-beat to keep the connection open, or simply restart the demon. Or of course: reconfigure the proxy to not close the connection on its own, or don't use a proxy at all, but put the bot into the same network as mattermost.
Yes I am, it's behind Nginx acting as a reverse + SSL front :) Let me test it by using the direct localhost URL, bypassing the proxy. I'm in the same network so I can work with that :+1:
Perfectly working as intended, the code is now running with a systemd service, thank you very much for the hint!
Starting the program with
npm start
(and the right env), it works for few minutes. After a bit (or when I leave the convo in Mattermost?) the program just ends like this:Using latest Node LTS on a Debian system.