Skip to content

Commit 1fde742

Browse files
authored
Merge pull request #43 from Its-Haze/increase_max_msg_size
Increase maximum message size to 8mb avoid dropping connections
2 parents 7005035 + 398af10 commit 1fde742

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

lcu_driver/connection.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,10 +168,13 @@ async def run_ws(self):
168168
169169
:return: None
170170
"""
171+
# 8MB
172+
MAX_WS_MSG_SIZE = 8 * 1024 * 1024
173+
171174
local_session = aiohttp.ClientSession(auth=aiohttp.BasicAuth('riot', self._auth_key),
172175
headers={'Content-Type': 'application/json',
173176
'Accept': 'application/json'})
174-
self._ws = await local_session.ws_connect(self.ws_address, ssl=False)
177+
self._ws = await local_session.ws_connect(self.ws_address, ssl=False, max_msg_size=MAX_WS_MSG_SIZE)
175178
await self._ws.send_json([5, 'OnJsonApiEvent'])
176179
_ = await self._ws.receive()
177180

0 commit comments

Comments
 (0)