From 2dce6df1520e32c1dea54600294eea91c75da6fe Mon Sep 17 00:00:00 2001 From: bfis Date: Mon, 11 Jan 2021 17:49:33 +0100 Subject: [PATCH] Add comment explaining workaround --- tornado/iostream.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tornado/iostream.py b/tornado/iostream.py index 51a348c2c..7610bce4f 100644 --- a/tornado/iostream.py +++ b/tornado/iostream.py @@ -1587,6 +1587,9 @@ class SSLIOStream(IOStream): # to read (attempting to read may or may not raise an exception # depending on the SSL version) return None + # clip buffer size at 1GB since SSL sockets only support upto 2GB + # this change in behaviour is transparent, since the function is + # already expected to (possibly) read less than the provided buffer if len(buf) >> 30: buf = memoryview(buf)[: 1 << 30] try: -- 2.47.2