Skip to content

Commit

Permalink
Log and return instead of panicing due to dead containers
Browse files Browse the repository at this point in the history
  • Loading branch information
deviantintegral committed Oct 3, 2022
1 parent 22b9b6e commit 160236d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion forwarder.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,10 @@ func (f *Forwarder) startForwarding(id string) {
// The container has been removed, so we can't do anything to get logs.
return
}
panic(err)
// The other common error is that the container is marked for removal. Unfortunately, the
// SDK doesn't send a specific error message, so we log and return.
log.Println(err)
return
}

// Good reference at https://www.linode.com/docs/guides/developing-udp-and-tcp-clients-and-servers-in-go/
Expand Down

0 comments on commit 160236d

Please # to comment.