Skip to content

Commit c7ee91e

Browse files
committed
adjusted requested buffer size
1 parent df909ea commit c7ee91e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/test_ssl.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,7 @@ def create_ssl_nonblocking_connection(
521521
f"Attempted SO_SNDBUF: {request_send_buffer_size}, "
522522
f"Actual SO_SNDBUF: {actual_sndbuf}"
523523
)
524+
524525
server_socket.setsockopt(
525526
SOL_SOCKET, SO_RCVBUF, requested_receive_buffer_size
526527
)
@@ -3312,8 +3313,9 @@ def _badwriteretry(
33123313
SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER and replaces with the given mode.
33133314
Returns True if a bad write retry error occurs.
33143315
"""
3316+
request_buffer_size = 4096 # Size of the send buffer we'll request
33153317
client_socket, server_socket, client, server, sndbuf, rcvbuf = (
3316-
create_ssl_nonblocking_connection(modeflag, 2048)
3318+
create_ssl_nonblocking_connection(modeflag, request_buffer_size)
33173319
)
33183320
result = False # Default return value
33193321
# set buffer size to the minimum of send and receive buffers

0 commit comments

Comments
 (0)