Commit 2df879c
authored
Fix Drop to prevent TLS data loss (#6825)
Remove pending_tls_output.clear() from Drop implementation.
SSLSocket._real_close() in Python doesn't call shutdown() before
closing - it just sets _sslobj = None. This means pending TLS data
in the output buffer may not have been flushed to the socket yet.
Clearing this buffer in Drop causes data loss, resulting in empty
HTTP responses (test_socketserver failure on Windows).
The explicit clearing is also unnecessary since all struct fields
are automatically freed when the struct is dropped.1 parent 1b5deea commit 2df879c
1 file changed
+7
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4406 | 4406 | | |
4407 | 4407 | | |
4408 | 4408 | | |
4409 | | - | |
| 4409 | + | |
| 4410 | + | |
| 4411 | + | |
| 4412 | + | |
| 4413 | + | |
| 4414 | + | |
| 4415 | + | |
4410 | 4416 | | |
4411 | | - | |
4412 | | - | |
4413 | | - | |
4414 | | - | |
4415 | | - | |
4416 | | - | |
4417 | | - | |
4418 | 4417 | | |
4419 | 4418 | | |
4420 | 4419 | | |
| |||
0 commit comments