Skip to content

Commit

Permalink
remove unnecesary nil value
Browse files Browse the repository at this point in the history
  • Loading branch information
ivcosla committed Apr 16, 2019
1 parent f26812f commit 4f0d1bd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/apps/chat/chat.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,10 @@ func sseHandler(w http.ResponseWriter, req *http.Request) {
}

clientChan = make(chan string)

go func() {
<-req.Context().Done()
close(clientChan)
clientChan = nil
log.Println("SSE connection were closed.")
}()

Expand Down

0 comments on commit 4f0d1bd

Please sign in to comment.