Browse Source

Crash loudly if an IRC message is too long despite all the checks and splits

master
JustAnotherArchivist 4 years ago
parent
commit
843775e948
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      http2irc.py

+ 2
- 0
http2irc.py View File

@@ -353,6 +353,8 @@ class IRCClientProtocol(asyncio.Protocol):

def send(self, data):
self.logger.debug(f'Send: {data!r}')
if len(data) > 510:
raise RuntimeError(f'IRC message too long ({len(data)} > 510): {data!r}')
self.transport.write(data + b'\r\n')

async def _get_message(self):


Loading…
Cancel
Save