The Goroutine called in `createCsbiDevice` can panic
The function in question can be found here. The recovery from a panic thrown from within the called Goroutine does not serve its purpose. A panic still crashes the whole controller.
Description
The current recover() defers as soon as createCsbiDevice() finishes. If the called Goroutine is still running and panics after the method finished it is not possible to recover from the panic. This results in a crash of the controller.
Expected Behavior
recover() should be called if the Goroutine panics
Actual Behavior
Goroutine panics and the controller crashes
Possible Fix
Move the recover function into the Goroutine
Context
Your Environment
- Version used:
- Environment name and version (e.g. go v1.16.3 on FreeBSD 13.0-current):
- Server type and version:
- Operating System and version: