#34 minor style change
This commit is contained in:
parent
87916dade6
commit
0cbd252ee4
@ -187,13 +187,10 @@ where
|
||||
IO: AsyncRead + AsyncWrite,
|
||||
{
|
||||
fn shutdown(&mut self) -> Poll<(), io::Error> {
|
||||
match self.state {
|
||||
s if !s.writeable() => (),
|
||||
_ => {
|
||||
if self.state.writeable() {
|
||||
self.session.send_close_notify();
|
||||
self.state.shutdown_write();
|
||||
}
|
||||
}
|
||||
|
||||
let mut stream = Stream::new(&mut self.io, &mut self.session);
|
||||
try_nb!(stream.flush());
|
||||
|
@ -121,13 +121,10 @@ where
|
||||
IO: AsyncRead + AsyncWrite,
|
||||
{
|
||||
fn shutdown(&mut self) -> Poll<(), io::Error> {
|
||||
match self.state {
|
||||
s if !s.writeable() => (),
|
||||
_ => {
|
||||
if self.state.writeable() {
|
||||
self.session.send_close_notify();
|
||||
self.state.shutdown_write();
|
||||
}
|
||||
}
|
||||
|
||||
let mut stream = Stream::new(&mut self.io, &mut self.session);
|
||||
try_nb!(stream.complete_io());
|
||||
|
Loading…
Reference in New Issue
Block a user