Skip to content

Commit

Permalink
chore(server): close before flush
Browse files Browse the repository at this point in the history
  • Loading branch information
Rambatino committed Apr 16, 2024
1 parent 18e65c0 commit c5550cc
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ func (srv *Server) Run(ctx context.Context) {
for {
select {
case <-ctx.Done():
srv.tcpCloser.Close()
srv.udpCloser.Close()
srv.Flush()
return
case <-ticker.C:
Expand Down

0 comments on commit c5550cc

Please sign in to comment.