fix output_ws and output_tcp deadlock (#1172)

This commit is contained in:
ivan-stankov-salt-security
2023-04-28 10:07:41 +03:00
committed by GitHub
parent dbd10c320a
commit ad503d45cb
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -88,8 +88,8 @@ func (o *TCPOutput) worker(bufferIndex int) {
if err != nil {
Debug(2, "INFO: TCP output connection closed, reconnecting")
o.buf[bufferIndex] <- msg
go o.worker(bufferIndex)
o.buf[bufferIndex] <- msg
break
}
}
+1 -1
View File
@@ -97,8 +97,8 @@ func (o *WebSocketOutput) worker(bufferIndex int) {
err = conn.WriteMessage(websocket.BinaryMessage, append(msg.Meta, msg.Data...))
if err != nil {
Debug(2, "INFO: WebSocket output connection closed, reconnecting "+err.Error())
o.buf[bufferIndex] <- msg
go o.worker(bufferIndex)
o.buf[bufferIndex] <- msg
break
}
}