carbonblack/cb-event-forwarder

Dropped event count not updated

Closed this issue · 0 comments

n2N8Z commented

In syslog_output.go output, when there has been an error sending the message, shouldn't the dropped event count be updated ?

func (o *SyslogOutput) output(m string) error {
	if !o.connected {
		// drop this event on the floor...
		atomic.AddInt64(&o.droppedEventCount, 1)
		return nil
	}

	err := o.outputSocket.Info(m)
	if err != nil {
		o.closeAndScheduleReconnection()
		atomic.AddInt64(&o.droppedEventCount, 1) <-- here
	}

	return err
}