Skip to content

[Question]: How to terminate the main loop #18

@urban-1

Description

@urban-1

Hi there,

I have been using this web server for a while and works for what I need, however, when I am restarting my main app too fast I cannot re-bind the port/socket. The TCP is in *_WAIT state:

$ netstat -tn | grep 8282
tcp4       0      0  127.0.0.1.8282         127.0.0.1.63878        FIN_WAIT_2
tcp4       0      0  127.0.0.1.63878        127.0.0.1.8282         CLOSE_WAIT
tcp4       0      0  127.0.0.1.63877        127.0.0.1.8282         TIME_WAIT

Is there a way to gracefully terminate the server? Am I doing something wrong?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions