From 46cf3f0791e4639e2bfd990caca209ef9212ebc5 Mon Sep 17 00:00:00 2001 From: Steven Fackler Date: Mon, 17 Mar 2014 21:46:05 -0700 Subject: [PATCH] SSL session closure should be treated like EOF --- ssl/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ssl/mod.rs b/ssl/mod.rs index 807cf36f..bd7ff445 100644 --- a/ssl/mod.rs +++ b/ssl/mod.rs @@ -2,7 +2,7 @@ use sync::one::{Once, ONCE_INIT}; use std::cast; use std::libc::{c_int, c_void, c_char}; use std::ptr; -use std::io::{IoResult, IoError, OtherIoError, Stream, Reader, Writer}; +use std::io::{IoResult, IoError, OtherIoError, EndOfFile, Stream, Reader, Writer}; use std::unstable::mutex::NativeMutex; use std::vec_ng::Vec; @@ -518,7 +518,7 @@ impl Reader for SslStream { Ok(len) => Ok(len as uint), Err(SslSessionClosed) => Err(IoError { - kind: OtherIoError, + kind: EndOfFile, desc: "SSL session closed", detail: None }),