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

Improve console shutdown #2016

Merged
merged 6 commits into from
Jun 6, 2022
Merged

Improve console shutdown #2016

merged 6 commits into from
Jun 6, 2022

Conversation

Karlatemp
Copy link
Member

尝试缓解 #1959


  • 添加关闭 console 的方法: MiraiConsole.shutdownConsole()
  • 添加关闭 1min 超时机制
  • 强行中断已知会堵死 shutdown 的操作
    • java.desktop/java.awt.Window.dispose()

@Karlatemp Karlatemp added t:enhancement 类型: 现有功能上的优化 s:console 子系统: mirai-console labels May 6, 2022
@Him188 Him188 self-requested a review May 6, 2022 11:30
@Him188 Him188 added this to the 2.12.0-RC milestone May 6, 2022
@Him188 Him188 added the z:ready-to-merge 状态: PR 已经可以合并, 正在等待一些安排 label May 16, 2022
@Karlatemp Karlatemp linked an issue May 29, 2022 that may be closed by this pull request
@Him188
Copy link
Member

Him188 commented Jun 6, 2022

没问题了就可以合

@Karlatemp Karlatemp merged commit d0c1848 into dev Jun 6, 2022
@Karlatemp Karlatemp deleted the console/console-shutdown branch June 6, 2022 16:10
cssxsh pushed a commit to SkyNet1748/mirai that referenced this pull request Jul 20, 2022
* Try to improve console shutdown

* Resetting & Better java calling

* Dump crash report when timed out to shutdown

* Ensure `CoroutineScope.cancel()` working; rename to `shutdown`

* Signal handlers

* Force halt system to avoid some magic errors
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s:console 子系统: mirai-console t:enhancement 类型: 现有功能上的优化 z:ready-to-merge 状态: PR 已经可以合并, 正在等待一些安排
Projects
None yet
Development

Successfully merging this pull request may close these issues.

收到SIGINT后程序不退出
2 participants