Check for deferred certificate verification errors (TLS 1.3) If an error exists, raise it and clear it from storage
(&self, vm: &VirtualMachine)
| 2391 | // Check for deferred certificate verification errors (TLS 1.3) |
| 2392 | // If an error exists, raise it and clear it from storage |
| 2393 | fn check_deferred_cert_error(&self, vm: &VirtualMachine) -> PyResult<()> { |
| 2394 | let error_opt = self.deferred_cert_error.read().clone(); |
| 2395 | if let Some(error_msg) = error_opt { |
| 2396 | // Clear the error so it's only raised once |
| 2397 | *self.deferred_cert_error.write() = None; |
| 2398 | // Raise OSError with the stored error message |
| 2399 | return Err(vm.new_os_error(error_msg)); |
| 2400 | } |
| 2401 | Ok(()) |
| 2402 | } |
| 2403 | |
| 2404 | // Get socket timeout as Duration |
| 2405 | pub(crate) fn get_socket_timeout(&self, vm: &VirtualMachine) -> PyResult<Option<Duration>> { |