Skip to content

Commit 0154038

Browse files
Added error handling for Expire session
1 parent 016b8ef commit 0154038

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cmd/laclm/main.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,11 @@ func run(ctx context.Context) error {
302302

303303
usernames := sessionManager.GetAllUsernames()
304304
for _, username := range usernames {
305-
sessionManager.ExpireSession(username)
305+
if err := sessionManager.ExpireSession(username); err != nil {
306+
zap.L().Warn("Failed to expire session during shutdown",
307+
zap.String("username: ", username),
308+
)
309+
}
306310
zap.L().Info("Session forced expired for: ",
307311
zap.String("username", username),
308312
)

0 commit comments

Comments
 (0)