<wip>tunnel: consider the connection's close

Signed-off-by: Tw <tw19881113@gmail.com>