Skip to content

Commit

Permalink
updated log reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisaaronland committed Sep 24, 2021
1 parent f3a5e52 commit 98819b5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions broker/broker.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func (b *Broker) HandlerFuncWithTimeout(ttl *time.Duration) (http.HandlerFunc, e
}

defer func() {
b.Logger.Println("SSE finish handler")
b.Logger.Printf("SSE finish handler from %s", r.RemoteAddr)
}()

fl, ok := w.(http.Flusher)
Expand Down Expand Up @@ -127,7 +127,7 @@ func (b *Broker) HandlerFuncWithTimeout(ttl *time.Duration) (http.HandlerFunc, e

go func() {
<-notify
b.Logger.Println("SSE HTTP connection just closed.")
b.Logger.Println("Received ctx.Done notification.")
b.bunk_clients <- messageChan
// Don't close(messageChan) since it's unnecessary and
// seems to cause CPU to spike to 100% Computers, amirite?
Expand Down

0 comments on commit 98819b5

Please sign in to comment.