[Fixed] TlsStream should not check poll_write
This commit is contained in:
parent
7e4fcca032
commit
1921f2bf49
@ -77,6 +77,7 @@ fn main() {
|
||||
\r\n\
|
||||
Hello world!".as_bytes()
|
||||
))
|
||||
.and_then(|(stream, _)| io::flush(stream))
|
||||
.map(move |_| println!("Accept: {}", addr))
|
||||
.map_err(move |err| println!("Error: {:?} - {}", err, addr));
|
||||
handle.spawn(done);
|
||||
|
@ -221,7 +221,7 @@ impl<S, C> io::Write for TlsStream<S, C>
|
||||
|
||||
fn flush(&mut self) -> io::Result<()> {
|
||||
self.session.flush()?;
|
||||
while self.session.wants_write() && self.io.poll_write().is_ready() {
|
||||
while self.session.wants_write() {
|
||||
self.session.write_tls(&mut self.io)?;
|
||||
}
|
||||
Ok(())
|
||||
|
Loading…
Reference in New Issue
Block a user