1
1
mirror of https://github.com/OpenDiablo2/OpenDiablo2 synced 2025-01-12 04:17:25 -05:00

turn back on sigchanyzer: fix lint errors

This commit is contained in:
gucio321 2021-05-17 10:39:10 +02:00
parent a688d660a0
commit b30edba49d
2 changed files with 3 additions and 3 deletions

View File

@ -32,8 +32,6 @@ linters-settings:
# to possibly non-intuitive layout of struct fields (harder to read). Disable
# `fieldalignment` check here until we evaluate if it is worthwhile.
- fieldalignment
# https://github.com/golangci/golangci-lint/issues/1973
- sigchanyzer
lll:
line-length: 140
misspell:

View File

@ -141,7 +141,9 @@ func (a *App) startDedicatedServer() error {
return srvErr
}
c := make(chan os.Signal)
// We must use a buffered channel or risk missing the signal
// if we're not ready to receive when the signal is sent.
c := make(chan os.Signal, 1)
signal.Notify(c, os.Interrupt, syscall.SIGTERM) // This traps Control-c to safely shut down the server
go func() {