Add support for graceful shutdown on server error
Open
go
good first issue
hacktoberfest
websocket
- Dominant language
- Go
- Stars
- 6
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
### 🔧 Add Graceful Shutdown
Currently, the server uses:
```go
log.Fatal(http.ListenAndServe(...))
````
This exits immediately on failure. Instead, use `http.Server` with `Shutdown(ctx)` to:
* Allow in-flight requests to complete
* Perform cleanup (e.g., disconnect clients)
👉 Consider using signal handling with `os/signal` for Ctrl+C interrupts.
Contributor guide
Assessment
This issue has not been assessed yet.