Fix Drop to prevent TLS data loss by youknowone · Pull Request #6825 · RustPython/RustPython
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.
marked this pull request as ready for review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters