Fix Firecracker PID resolution and deprecated net.Error.Temporary

Use context.Background() for resolveFirecrackerPID so a cancelled
request context (client disconnect) doesn't prevent tracking the
spawned Firecracker process, leaving it orphaned on cleanup.

Drop ne.Temporary() check in accept loop; deprecated since Go 1.18
and unreliable. Retry on any net.Error instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Thales Maciel 2026-04-15 12:44:38 -03:00
parent 0e764b0571
commit 09590cbaa0
No known key found for this signature in database
GPG key ID: 33112E6833C34679
2 changed files with 6 additions and 3 deletions

View file

@ -168,7 +168,7 @@ func (d *Daemon) Serve(ctx context.Context) error {
return nil
default:
}
if ne, ok := err.(net.Error); ok && ne.Temporary() {
if _, ok := err.(net.Error); ok {
if d.logger != nil {
d.logger.Warn("daemon accept temporary failure", "error", err.Error())
}