diff --git a/confluent_client/confluent/tlvdata.py b/confluent_client/confluent/tlvdata.py index 356a4ee0..5a13f901 100644 --- a/confluent_client/confluent/tlvdata.py +++ b/confluent_client/confluent/tlvdata.py @@ -38,6 +38,9 @@ def send(handle, data): if isinstance(data, str): # plain text, e.g. console data tl = len(data) + if tl == 0: + # if you don't have anything to say, don't say anything at all + return if tl < 16777216: # type for string is '0', so we don't need # to xor anything in diff --git a/confluent_server/confluent/consoleserver.py b/confluent_server/confluent/consoleserver.py index 37a70161..0e0bdeaa 100644 --- a/confluent_server/confluent/consoleserver.py +++ b/confluent_server/confluent/consoleserver.py @@ -347,6 +347,9 @@ class _ConsoleHandler(object): if data == conapi.ConsoleEvent.Disconnect: self._got_disconnected() return + elif data == '': + # ignore empty strings from a cconsole provider + return if '\x1b[?1l' in data: # request for ansi mode cursor keys self.appmodedetected = False if '\x1b[?1h' in data: # remember the session wants the client to use