File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed
Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,7 @@ cdef class SSLProtocol:
5757 object _incoming_write
5858 object _outgoing
5959 object _outgoing_read
60+ object _ssl_read_max_size_obj
6061 char * _ssl_buffer
6162 size_t _ssl_buffer_len
6263 object _ssl_buffer_view
Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ cdef class SSLProtocol:
200200 """
201201
202202 def __cinit__ (self , *args , **kwargs ):
203+ self ._ssl_read_max_size_obj = SSL_READ_MAX_SIZE
203204 self ._ssl_buffer_len = SSL_READ_MAX_SIZE
204205 self ._ssl_buffer = < char * > PyMem_RawMalloc(self ._ssl_buffer_len)
205206 if not self ._ssl_buffer:
@@ -587,7 +588,7 @@ cdef class SSLProtocol:
587588 bint close_notify = False
588589 try :
589590 while True :
590- if not self ._sslobj_read(SSL_READ_MAX_SIZE ):
591+ if not self ._sslobj_read(self ._ssl_read_max_size_obj ):
591592 close_notify = True
592593 break
593594 except ssl_SSLAgainErrors as exc:
@@ -773,7 +774,7 @@ cdef class SSLProtocol:
773774
774775 try :
775776 while True :
776- chunk = self ._sslobj_read(SSL_READ_MAX_SIZE )
777+ chunk = self ._sslobj_read(self ._ssl_read_max_size_obj )
777778 if not chunk:
778779 break
779780 if zero:
You can’t perform that action at this time.
0 commit comments