gitea/cmd
Lunny Xiao 304d836a61
Fix shutdown waitgroup panic (#35676)
This PR fixes a panic issue in the WaitGroup that occurs when Gitea is
shut down using Ctrl+C.
It ensures that all active connection pointers in the server are
properly tracked and forcibly closed when the hammer shutdown is
invoked.
The process remains graceful — the normal shutdown sequence runs before
the hammer is triggered, and existing connections are given a timeout
period to complete gracefully.

This PR also fixes `no logger writer` problem. Now the log close will
only be invoked when the command exit.

- Fixes #35468
- Fixes #35551
- Fixes #35559
- Replace #35578

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-25 00:02:58 -07:00
..
actions.go
admin_auth_ldap_test.go
admin_auth_ldap.go
admin_auth_oauth_test.go
admin_auth_oauth.go
admin_auth_smtp_test.go
admin_auth_smtp.go
admin_auth.go
admin_regenerate.go
admin_user_change_password_test.go
admin_user_change_password.go
admin_user_create_test.go
admin_user_create.go
admin_user_delete_test.go
admin_user_delete.go
admin_user_generate_access_token.go
admin_user_list.go
admin_user_must_change_password_test.go
admin_user_must_change_password.go
admin_user.go
admin.go
cert_test.go
cert.go
cmd_test.go
cmd.go
config_test.go Intorduce "config edit-ini" sub command to help maintaining INI config file (#35735) 2025-10-25 10:54:55 +08:00
config.go Intorduce "config edit-ini" sub command to help maintaining INI config file (#35735) 2025-10-25 10:54:55 +08:00
docs.go
doctor_convert.go
doctor_test.go
doctor.go
dump_repo.go
dump.go
embedded.go
generate.go
hook_test.go
hook.go
keys.go
mailer.go
main_test.go
main.go Intorduce "config edit-ini" sub command to help maintaining INI config file (#35735) 2025-10-25 10:54:55 +08:00
manager_logging.go
manager.go
migrate_storage_test.go
migrate_storage.go
migrate.go
restore_repo.go
serv.go Refactor legacy code (#35708) 2025-10-20 11:43:08 -07:00
web_acme.go
web_graceful.go
web_https.go
web.go Fix shutdown waitgroup panic (#35676) 2025-10-25 00:02:58 -07:00