Skip to content

Commit

Permalink
restore parser size and return on connection error
Browse files Browse the repository at this point in the history
  • Loading branch information
xmonader committed Sep 8, 2021
1 parent c37949c commit 81c6953
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jumpscale/servers/gedis/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ def _execute(self, method, args, kwargs):

def _on_connection(self, socket, address):
j.logger.debug(f"New connection from {address}")
parser = DefaultParser(4096)
parser = DefaultParser(65536)
connection = RedisConnectionAdapter(socket)
try:
encoder = ResponseEncoder(socket)
Expand Down Expand Up @@ -278,6 +278,7 @@ def _on_connection(self, socket, address):
except ConnectionError:
j.logger.debug(f"Client {address} closed the connection", address)
parser.on_disconnect()
return

except Exception as exception:
j.logger.exception("internal error", exception=exception)
Expand Down

0 comments on commit 81c6953

Please sign in to comment.