Enhance graceful shutdown and logging for HTTP server
- Implemented graceful shutdown for the HTTP server, allowing for a controlled shutdown process with a timeout. - Added logging for shutdown signals and server exit to improve traceability during application termination. - Introduced IP blacklist configuration to enhance security by blocking specified IP addresses. - Updated database cache configurations to allow dynamic adjustment via environment variables for better performance tuning.
This commit is contained in:
@@ -263,6 +263,7 @@ func (r *Client) ConnectWithTLS(
|
||||
case wr := <-r.writeQueue:
|
||||
// all write requests will go through this to prevent races
|
||||
// log.D.F("{%s} sending %v\n", r.URL, string(wr.msg))
|
||||
log.T.F("WS.Client: outbound message to %s: %s", r.URL, string(wr.msg))
|
||||
if err = r.Connection.WriteMessage(
|
||||
r.connectionContext, wr.msg,
|
||||
); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user