Skip to content

Commit

Permalink
fix: destruct timer duration (#176)
Browse files Browse the repository at this point in the history
  • Loading branch information
evan-buss authored Jul 1, 2024
1 parent 47e184c commit 0074f2f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ func (server *server) startEventForwarder(ctx context.Context) {
if server.connectedClients.Load() == 0 {
// Keep the client and IRC connection alive for 3 minutes in case another client connects
server.log.Println("No clients connected. Waiting 3 minutes before closing connection.")
destructTimer = time.AfterFunc(time.Second*30, func() {
destructTimer = time.AfterFunc(3*time.Minute, func() {
if server.connectedClients.Load() == 0 {
server.irc.Disconnect()
server.log.Println("IRC connection closed.")
Expand Down

0 comments on commit 0074f2f

Please sign in to comment.