Commit 2e7b2d23 authored by Dom Sekotill's avatar Dom Sekotill
Browse files

Up the read size of packets to 128kB

This seems reasonable for Unix datagram sockets. It is probably beyond
what is necessary, but 1kB is definitely not enough when pulling BSS
information.
parent 421a2a55
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -30,6 +30,10 @@ from . import consts
from .. import errors, util


# 128kB (actual max size slightly less than this)
MAX_DGRAM_READ = 2 ** 17


class EventPriority(enum.IntEnum):
	"""
	Event Message priorities
@@ -181,7 +185,7 @@ class BaseClient:
			if not queue.empty():
				return

			msg = (await self.sock.recv(1024)).decode().strip()
			msg = (await self.sock.recv(MAX_DGRAM_READ)).decode().strip()

		self.logger.debug("Received: %s", repr(msg))
		match = self.event_regex.match(msg)