Skip to content

Commit c3cfed3

Browse files
committed
Fix flush method of TcpStream and simplify TlsStream flush
(fixes #64)
1 parent 70a9881 commit c3cfed3

File tree

3 files changed

+4
-7
lines changed

3 files changed

+4
-7
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
- `/ignore` command added to ignore `join/quit` messages in channels.
1616
- New server config field `pass` added for connecting to password-protected
1717
servers (e.g. znc).
18+
- Fixed a bug that caused tiny to fail to connect via TLS on some systems
19+
(#64).
1820

1921
# 2017/11/12: 0.3.0
2022

src/stream/tcp.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,6 @@ impl<'poll> Write for TcpStream<'poll> {
124124
}
125125

126126
fn flush(&mut self) -> io::Result<()> {
127-
self.write_ready()
127+
Ok(())
128128
}
129129
}

src/stream/tls.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,6 @@ impl<'poll> Write for TlsStream<'poll> {
132132
}
133133

134134
fn flush(&mut self) -> io::Result<()> {
135-
match *self {
136-
TlsStream::Handshake { .. } | TlsStream::Broken =>
137-
Ok(()),
138-
TlsStream::Connected { ref mut stream } =>
139-
stream.flush(),
140-
}
135+
Ok(())
141136
}
142137
}

0 commit comments

Comments
 (0)