Skip to content

Used port is not freed when using Deno.run with --watch #16267

@yooneskh

Description

@yooneskh

When running this code

Deno.serve(() => {}, { port: x })

with this command

deno run -A --unstable --watch script.ts

I get this error everytime i make a change and have to kill the script (ctrl + c) and run it again.

Watcher File change detected! Restarting!
error: Uncaught (in promise) AddrInUse: Address already in use (os error 98)
Watcher Process finished. Restarting on file change...

deno 1.26.1 (release, x86_64-unknown-linux-gnu)
Linux Fedora 37

Metadata

Metadata

Assignees

No one assigned

    Labels

    --watchrelated to the watch feature of the CLIbugSomething isn't working correctlyclirelated to cli/ dir

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions