Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit 40b3fec

Browse files
Log and return instead of panicing due to dead containers (#3)
2 parents 2f3aae7 + 160236d commit 40b3fec

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

forwarder.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ func (f *Forwarder) startForwarding(id string) {
152152
// The container has been removed, so we can't do anything to get logs.
153153
return
154154
}
155-
panic(err)
155+
// The other common error is that the container is marked for removal. Unfortunately, the
156+
// SDK doesn't send a specific error message, so we log and return.
157+
log.Println(err)
158+
return
156159
}
157160

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

0 commit comments

Comments
 (0)