containerd / ttrpc-rust

Rust implementation of ttrpc (GRPC for low-memory environments)
Apache License 2.0
195 stars 45 forks source link

server: fix the panic issue when client connection closed #23

Closed lifupan closed 4 years ago

lifupan commented 4 years ago

If the theads pool has been exhausted and it try to kick the thread pool try to create another thread, but at the same time the connection closed at the same time and the write channel set "quit" to true which would trigge connection dealing main thread exit, thus the control_rx channel would be closed and the following try_send to channel control_tx point would get an error.

Signed-off-by: fupan.lfp fupan.lfp@antfin.com