Skip to content

Commit

Permalink
fix: log api panic (devtron-labs#3156)
Browse files Browse the repository at this point in the history
* wip

* wip
  • Loading branch information
iamayushm authored Mar 21, 2023
1 parent 1161126 commit 56af646
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion api/connector/Connector.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,9 @@ func (impl PumpImpl) StartK8sStreamWithHeartBeat(w http.ResponseWriter, isReconn
}
eventId := strconv.FormatInt(parsedTime.UnixNano(), 10)
mux.Lock()
err = impl.sendEvent([]byte(eventId), nil, []byte(splitLog[1]), w)
if len(splitLog) == 2 {
err = impl.sendEvent([]byte(eventId), nil, []byte(splitLog[1]), w)
}
mux.Unlock()
if err != nil {
impl.logger.Errorw("error in writing data over sse", "err", err)
Expand Down

0 comments on commit 56af646

Please sign in to comment.