You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix SSL handshake over-reading in STARTTLS (RustPython#7417)
During STARTTLS handshake, sock_recv(16KB) could consume
application data that arrived alongside handshake records.
The consumed data ended up in rustls's internal buffer where
select() could not detect it, causing asyncore-based servers
to miss readable events and the peer to time out.
Use MSG_PEEK to find the TLS record boundary, then recv()
only one complete record. Remaining data stays in the kernel
TCP buffer, visible to select(). This matches OpenSSL's
default no-read-ahead behaviour.
Fixes flaky test_poplib (TestPOP3_TLSClass) failures.
Copy file name to clipboardExpand all lines: crates/vm/src/vm/vm_new.rs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -110,8 +110,8 @@ impl VirtualMachine {
110
110
debug_assert_eq!(
111
111
exc_type.slots.basicsize,
112
112
core::mem::size_of::<PyBaseException>(),
113
-
"vm.new_exception() is only for exception types without additional payload. The given type '{}' is not allowed.",
114
-
exc_type.class().name()
113
+
"vm.new_exception() is only for exception types without additional payload. The given type '{}' is not allowed. Use vm.new_os_subtype_error() for OSError subtypes.",
0 commit comments