Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion cmd/bot/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,12 @@ func main() {
})

if err := client.Connect(cfg.BotUser, cfg.BotPass); err != nil {
log.Fatalf("Failed to connect: %v", err)
log.Printf("Failed to connect: %v", err)
if strings.Contains(err.Error(), "authentication failed") {
log.Println("Auth failure is permanent — exiting to prevent Docker restart loop")
os.Exit(0)
}
os.Exit(1)
}
defer client.Disconnect()

Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ services:
https_proxy: "${https_proxy:-}"
no_proxy: "${no_proxy:-}"
container_name: geekbot
restart: unless-stopped
restart: on-failure
env_file: .env
volumes:
- bot-data:/data
Expand Down
Loading