gowut icon indicating copy to clipboard operation
gowut copied to clipboard

There's no way to stop a server other than exiting the program

Open AmanitaVerna opened this issue 8 years ago • 2 comments

This seems like a problem if you want to, say, include a feature to change the port via the gowut interface, but can't actually shut down and restart the server.

Googling indicates that it is possible. See for example https://github.com/tylerb/graceful

AmanitaVerna avatar May 24 '16 14:05 AmanitaVerna

I'd second this enhancement. Would the following be directly useful? https://golang.org/pkg/net/http/#Server.Shutdown

willauld avatar Apr 26 '17 04:04 willauld

Yes, the graceful shutdown addition in Go 1.8 can be used for this.

icza avatar Apr 26 '17 10:04 icza