Open
Description
Beanstalk should gracefully return error instead of panicking if there is an connection issue.
We see our code crashes due to this panic.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x13f50cc]
goroutine 24968 [running]:
github.com/beanstalkd/go-beanstalk.(*Conn).cmd(0x0, 0xc002957040, 0xc00071fa40, {0x0, 0x1761ca0, 0x0}, {0x19a437a, 0x14}, {0xc00071fa30, 0x1, ...})
/src/vendor/github.com/beanstalkd/go-beanstalk/conn.go:76 +0x8c
github.com/beanstalkd/go-beanstalk.(*TubeSet).Reserve(0xc0027558e0, 0xc00071fa90)
/src/vendor/github.com/beanstalkd/go-beanstalk/tubeset.go:30 +0x98
Please suggest why this happens, and where the fix is required.
We tried to handle this at our code end to reduce its occurence, but it still occurs sometime practo/k8s-worker-pod-autoscaler#88