Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Nil check named pipe shutdowns (open-telemetry#31088)
When the `Start` method of the named pipe is called, it will create a new named pipe and start listening for connections. If that Start method _fails_ for any reason, some parts of the named pipe will not be initialized. This means that when the `Stop` method is called (as the collector does when `Start` fails), it will panic with a nil pointer dereference. This change adds a couple of nil checks to the `Stop` method to prevent this panic, because otherwise we just get the SIGSEGV signal, and we never get any error logs. **Testing:** Running this in prod @ Cloudflare **Documentation:** <Describe the documentation added.> Signed-off-by: sinkingpoint <[email protected]>
- Loading branch information