Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit1884878

Browse files
jalopezsilvasethmlarson
authored andcommitted
[1.26] Properly proxy EOF on the SSLTransport test suite
Previously the proxy was continuously ignoring EOF signals and keepingthe socket open.Signed-off-by: Jorge Lopez Silva <jalopezsilva@gmail.com>
1 parenta891304 commit1884878

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎test/test_ssltransport.py‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,7 @@ def proxy_handler(listener):
258258
)
259259
self._read_write_loop(client_sock,upstream_sock)
260260
upstream_sock.close()
261+
client_sock.close()
261262

262263
self._start_server(proxy_handler)
263264

@@ -286,6 +287,10 @@ def _read_write_loop(self, client_sock, server_sock, chunks=65536):
286287
ifwrite_socketinwritable:
287288
try:
288289
b=read_socket.recv(chunks)
290+
iflen(b)==0:
291+
# One of the sockets has EOFed, we return to close
292+
# both.
293+
return
289294
write_socket.send(b)
290295
exceptssl.SSLEOFError:
291296
# It's possible, depending on shutdown order, that we'll
@@ -335,6 +340,7 @@ def socket_handler(listener):
335340
request=consume_socket(ssock)
336341
validate_request(request)
337342
ssock.send(sample_response())
343+
sock.close()
338344

339345
cls._start_server(socket_handler)
340346

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp