Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

怎么实现服务端的优雅关闭(ctrl+c && exit) 退出 #6

Open
zouxh opened this issue Dec 29, 2021 · 0 comments
Open

怎么实现服务端的优雅关闭(ctrl+c && exit) 退出 #6

zouxh opened this issue Dec 29, 2021 · 0 comments

Comments

@zouxh
Copy link

zouxh commented Dec 29, 2021

如题,我想做到服务端限制用户过多的连接,当有重复连接的时候去关闭原来的长连接,不是简单的直接close掉,避免出现僵尸进程。
我在进行尝试的时候写了TeminalSession 的read和write方法,这里都不行,这2 个方法是客户端和服务端的读取和输出响应不能用在这种场景,看代码不知道底层怎么去执行shell的,其实就是想服务端主动执行exit命令进行退出,请指教。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant