Skip to content

Commit

Permalink
Revert ws.WriteControl to use real time.
Browse files Browse the repository at this point in the history
Usage of the fake clock was failing the tests, and it's not really beneficial in this case.
  • Loading branch information
jakule committed Aug 14, 2023
1 parent 7f96513 commit 608d3be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/web/assistant.go
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,7 @@ func runAssistant(h *Handler, w http.ResponseWriter, r *http.Request,
// Send the close message to the client and close the connection
if err := ws.WriteControl(websocket.CloseMessage,
websocket.FormatCloseMessage(closureReason, closureMsg),
h.clock.Now().Add(time.Second),
time.Now().Add(time.Second),
); err != nil {
h.log.Warnf("Failed to write close message: %v", err)
}
Expand Down

0 comments on commit 608d3be

Please sign in to comment.