Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions crates/shadowsocks-service/src/local/tun/tcp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ impl Drop for TcpTun {
self.manager_running.cancel();
self.manager_notify.notify_one();
if let Some(handle) = self.manager_handle.take() {
if let Err(e) = tokio::runtime::Handle::current().block_on(handle) {
log::error!("TcpTun smoltcp-poll error: {:?}", e);
}
log::debug!("TcpTun::drop, waiting for manager thread to exit");
std::thread::sleep(std::time::Duration::from_millis(100));
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There must be another way to make it work gracefully.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I'm researching it.

handle.abort();
}
}
}
Expand Down