mirror of
https://github.com/xcat2/confluent.git
synced 2025-01-17 13:13:18 +00:00
Avoid attempting to log negative client count
If another bug causes client count to go negative, at least avoid sending that mistake to log, except as part of a trace log.
This commit is contained in:
parent
d06f5cc966
commit
9530f76af3
@ -304,6 +304,11 @@ class _ConsoleHandler(object):
|
||||
# clearly indicate redundant connections
|
||||
# not connection count
|
||||
edata = 2
|
||||
if edata < 0:
|
||||
_tracelog.log('client count negative' + traceback.format_exc(),
|
||||
ltype=log.DataTypes.event,
|
||||
event=log.Events.stacktrace)
|
||||
edata = 0
|
||||
self.log(
|
||||
logdata=username, ltype=log.DataTypes.event,
|
||||
event=log.Events.clientconnect, eventdata=edata)
|
||||
|
Loading…
x
Reference in New Issue
Block a user