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

Commit 160236d

Browse files
Log and return instead of panicing due to dead containers
1 parent 22b9b6e commit 160236d

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
@@ -155,7 +155,10 @@ func (f *Forwarder) startForwarding(id string) {
155155
// The container has been removed, so we can't do anything to get logs.
156156
return
157157
}
158-
panic(err)
158+
// The other common error is that the container is marked for removal. Unfortunately, the
159+
// SDK doesn't send a specific error message, so we log and return.
160+
log.Println(err)
161+
return
159162
}
160163

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

0 commit comments

Comments
 (0)