denon [script name] doesn't kill app on reload
See original GitHub issueI have a simple web server application running with oak. When I use the command denon run --allow-net app.ts
the auto reload successfully kill the webserver on each reload.
But when I use the denon dev
command and using the denon.json file, the application isn’t killed on each reload. For example, if I run the webserver on 8080 port, then change it to 8081 then save, I end up with 2 webserver. If I doesn’t change the port between two save, I hand up with an error saying one app already use this port.
Here is my denon.json file
And my app.ts file
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:36 (12 by maintainers)
Top Results From Across the Web
Close qvw after reload script ended - Qlik Community - 1886392
When I use a macro as below, qvw B is not opened, and when I delete the closing part B does not close....
Read more >Raycast Marketplace
Search Note By Name. This script searches for a note, given its exact name, or a substring, the search does not consider case....
Read more >Siriusxm app login problems - cattolimonica.it
Reinstall the Surfshark app, then restart your device and try to log in again. ... Every 6 months or so, the Sirius XM...
Read more >0.116: Entities card row editor, restore snapshots and performance ...
Did restart and flush cache on browser (Chrome on PC). Same problem with Android Mobile App with the same two integrations.
Read more >NextJs <Link> doesn't rerun scripts - Stack Overflow
As far as I can tell this happens because the <Link> tag makes it a Single-Page Application and doesn't refresh the page when...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I have also confirmed this to still be a problem, using Windows 10, Deno 1.6.3, and Denon 2.4.5. I believe the problem is that when the killAll() routine in deamon.ts calls p.close() under Windows, this is not actually killing the process. Can confirm this with ProcessExplorer, and see that the original process ID is never killed, and subsequent processes die due to the Socket reuse error.
I’m not a Github guru, so I’m just posting my small change here, adding p.kill() to the Windows case, which fixes the problem for me.
Could also just get rid of the whole “if” and use kill() always. But I’m sure p.close() was added specially for Windows for some reason, and based on other reports here it seems to sometimes work, so I’m not sure why it is not working for all of us. I’m also not sure whether kill() has any bad/unintended effects in Windows.
Thanks @dale-roberts , I submitted a pull request for your suggestion: #120