From e01c34603d7245dae3dfcb27d113197654d4d397 Mon Sep 17 00:00:00 2001 From: eric Date: Tue, 23 Feb 2021 18:35:26 +0800 Subject: [PATCH] dispatcher: add some useful notes --- leaf/src/app/dispatcher.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/leaf/src/app/dispatcher.rs b/leaf/src/app/dispatcher.rs index 3e1d2e8..33d503f 100644 --- a/leaf/src/app/dispatcher.rs +++ b/leaf/src/app/dispatcher.rs @@ -290,6 +290,7 @@ impl Dispatcher { ); } Err(up_e) => { + // FIXME Perhaps we should terminate the pipe immediately. debug!( "tcp uplink {} -> {} error: {} [{}]", &sess.source, @@ -318,6 +319,10 @@ impl Dispatcher { // Because uplink has been completed, no furture data from the inbound // connection, we would like to close the write side of the outbound // connection, so that notifies the close of the pipeline. + // + // TODO Perhaps we should not send FIN in order to compatible with some + // of the improperly implemented server programs, e.g. a server closes + // the write side after reading EOF on read side. let rw_shutdown = rw.shutdown(); // Drives both the above tasks to completion simultaneously and get the