I’m not too sure how the Heroku platform works, it’s very possible the Heroku instance is not constantly online, which is required by this app to keep a connection open. As well as you should have to define the port on line 4 in index.js that Heroku uses.
Actually you did that, looking at your site it shows this Might want to pull you logs and see if there was an error. Also, don’t set port 80 in your module. Just set it to https://long-polling-rb.herokuapp.com/
I’ve discovered this bug and meant to push my fix to GitHub but I haven’t quite got around to it. Do me a favor and DM me here on the dev forum and remind me to do it.
Update! We had a bug rolled out where we were not decoding messages on the node-server end of things. This has since been fixed, if you are having issues where it’s not working just upgrade your back-end/node version and the issue should subside. Sorry for any inconvience.
I haven’t attached a license, as it’s open source. It’s free to use, commercially, publically, or in any way you want. We guarantee no warranties or any guarantees at that. You’re free to use it as you wish (as long as you are not claiming it as your own).
Hey there! Awesome idea, I’ve thought of doing this for a bit of time, but you just saved my life, lol, mind if I take it and optimize it a little more?
He is using the MIT License, which means that he’s OK with people sharing modified source code, with some limitations. See this for an overview of the MIT License.
hey, I dont think :Disconnect() is working properly. I added a few print statements within the statement after the request is issued and they never fired. The Disconnect function also timeouts when given enough time.
edit: it was a spelling error within my program. I fixed it, however even upon disconnect the pings continue. This causes extremely long close times for servers. I am wondering if there is any way to disconnect 100% and stop pings so that servers can close easier.
edit 2: It seems the issue was on line 65 and 66 of the Connection ModuleScript.
these bind this function to when the server closes:
local function close()
HttpService:RequestAsync({
Url = newConnection.url.."/connection/"..newConnection.id,
Method = "DELETE",
})
end
this RequestAsync is never satisfied and so it hangs permanently. I have 0 use for this bind to close as I disconnect all of my connections before the server shutdown in a seperate script so I just removed it. This made servers go from taking 20-30 seconds to close to taking under 1.