Skip to content

Commit

Permalink
feat: HTTPサーバーのシャットダウン処理にcontext.TODO()を使用し、静的解析ツールの警告を解消
Browse files Browse the repository at this point in the history
  • Loading branch information
shin0729 committed Mar 2, 2024
1 parent bddc5f9 commit f9bc130
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion typing-server/api/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ func main() {
// シグナルを待機
<-sigChan
logger.Info("shutting down the server...")
if err := server.Shutdown(nil); err != nil {
ctx := context.TODO() // Use context.TODO() as a temporary placeholder
if err := server.Shutdown(ctx); err != nil {
logger.Error("error during server shutdown: %v", err)
errChan <- err // エラーをチャネルに送信
}
Expand Down

0 comments on commit f9bc130

Please sign in to comment.