Skip to content

Commit

Permalink
OPENAPI: addressed MR Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobm-splunk authored and daveshanley committed Apr 5, 2024
1 parent 5e9102a commit 3c27d94
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daemon/handle_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ func (ws *WiretapService) handleWebsocketRequest(request *model.Request) {
dialer.TLSClientConfig = &tls.Config{InsecureSkipVerify: !*websocketConfig.VerifyCert}
serverConn, _, err := dialer.Dial(newRequest.URL.String(), newRequest.Header)
if err != nil {
ws.config.Logger.Error("Unable to create server connection")
ws.config.Logger.Error(fmt.Sprintf("Unable to connect to remote server; websocket connection failed: %s", err))
return
}
defer func(serverConn *websocket.Conn) {
Expand Down Expand Up @@ -386,7 +386,7 @@ func getCloseCode(err error) (int, bool) {

func logWebsocketClose(config *shared.WiretapConfiguration, closeCode int, isUnexpected bool) {
if isUnexpected {
config.Logger.Error(fmt.Sprintf("Websocket closed unexepectedly with code: %d", closeCode))
config.Logger.Warn(fmt.Sprintf("Websocket closed unexepectedly with code: %d", closeCode))
} else {
config.Logger.Info(fmt.Sprintf("Websocket closed expectedly with code: %d", closeCode))
}
Expand Down

0 comments on commit 3c27d94

Please sign in to comment.