π BUG: when using nebula as library in custom application - we cannot handle os.Exit produced by library
valda-z opened this issue Β· comments
What version of nebula
are you using?
1.7.2
What operating system are you using?
Linux, macOS, Windows
Describe the Bug
We are using nebula as library in our own binaries. But because library code contains os.Exit, we cannot handle it.
In our solution we are using customized source code of nebula to handle it correctly.
Problem is with file interface.go on line 285 where is:
// This only seems to happen when something fatal happens to the fd, so exit.
os.Exit(2)
We are changing code in our solution to:
break;
And after break from loop library returns that connection is broken and we can start connecting again.
Logs from affected hosts
No logs needed
Config files from affected hosts
No response
I agree this should be fixed. I am curious how this is happening in your system, as I have never seen this os.Exit trigger in the wild myself. Do you have any details on that?
Hi @valda-z - I just wanted to bump this ticket again and ask if you have any additional details regarding this line of code being hit? Thanks!