Closed Apollon77 closed 6 years ago
Does this prevent the segmentation faults?
We tracked the topic down to a problem in my own code where it happened that the mbus_disconnect method was called twice and then the segfault happened at the second call of "close(handle->fd);" So yes this change makes sure that "close" is only called once for a filedescriptor at all.
It simply make sure "bad user code" do not break anything
as discussed in one of the node-mbus issues here is my change to prevent multiple "disconnect" calls to make problems by checking it.