pyzaist
pyzaist•15mo ago

WebSocket connections killing setInterval()

Hey Deno friends, it appears that websocket connections are somehow stopping the execution of setInterval(). I filed an issue about this here, two months ago: https://github.com/denoland/deno/issues/19707 Should I expect to get a resolution on this? Thanks!
GitHub
setInterval() callback stops getting called immediately after WebSo...
I have code that is sort of like this: run.ts: import { initGame } from "./serverGame.ts"; import socket from "./socket.ts"; initGame(); const handler = function(req: Request): ...
4 Replies
Deno AI Helper
Deno AI Helper•15mo ago
I'm sorry to hear about the issue you're experiencing. As an assistant, I don't have the ability to predict when or if a specific issue will be resolved. However, I can suggest a few steps to help you debug the problem. First, ensure that your Deno version is up-to-date. We've made several updates to the WebSocket and timer APIs over time, and it's possible that the issue has been resolved in a more recent version. If you're still experiencing the issue after updating Deno, you might want to try isolating the problem. Create a minimal script that only includes the WebSocket connection and the setInterval() function. This can help you determine whether the issue is specific to your larger codebase or if it's a problem with Deno itself. If the issue persists in the minimal script, it would be helpful to share that script in the issue you've opened. This could help others reproduce the problem and potentially find a solution. Remember to follow the issue you've opened for any updates or potential fixes. 🦕
pyzaist
pyzaistOP•15mo ago
I've updated and someone else on the issue already created a minimal repro script
bartlomieju
bartlomieju•15mo ago
@littledivy is working on a fix
pyzaist
pyzaistOP•15mo ago
oh awesome! glad to get confirmation. thanks for all the work you guys do, ive loved using Deno so far