Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0e1595e

Browse files
committed
add debug logging when client or server close connection
1 parent5f5994d commit0e1595e

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

‎src/lib.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,10 @@ impl<H> Future for Pipe<H> where H: PacketHandler + 'static {
296296

297297
// if the client connection has closed, close the server connection too
298298
match&client_read{
299-
&Err(ref e) =>{self.server_writer.stream.shutdown(Shutdown::Write).unwrap();},
299+
&Err(ref e) =>{
300+
debug!("Client closed connection: {}", e);
301+
self.server_writer.stream.shutdown(Shutdown::Write).unwrap();
302+
},
300303
_ =>{}
301304
}
302305

@@ -323,7 +326,10 @@ impl<H> Future for Pipe<H> where H: PacketHandler + 'static {
323326

324327
// if the server connection has closed, close the client connection too
325328
match&server_read{
326-
&Err(ref e) =>{self.client_writer.stream.shutdown(Shutdown::Write).unwrap();},
329+
&Err(ref e) =>{
330+
debug!("Server closed connection: {}", e);
331+
self.client_writer.stream.shutdown(Shutdown::Write).unwrap();
332+
},
327333
_ =>{}
328334
}
329335

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp