Skip to content
This repository has been archived by the owner on Feb 16, 2020. It is now read-only.

[BUGFIX] Fixes IPC disconnected error #2500

Merged
merged 1 commit into from
Sep 4, 2018
Merged

Conversation

DB-Alex
Copy link
Contributor

@DB-Alex DB-Alex commented Sep 3, 2018

Fixes the Error: IPC channel is already disconnected which is happening when we are trying to disconnect an already disconnected process

  • What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

  • What is the current behavior? (You can also link to an open issue here)

  • What is the new behavior (if this is a feature change)?

  • Other information:

Fixes the Error: IPC channel is already disconnected which is happening when we are trying to disconnect an already disconnected process
@DB-Alex
Copy link
Contributor Author

DB-Alex commented Sep 3, 2018

After more tests, this is not a full fix.

More information about error:

screen shot 2018-09-03 at 23 38 21

This only happens when the redisBeacon is on! For now I disabled redis and then its working fine.

@askmike
Copy link
Owner

askmike commented Sep 4, 2018

ping @eusorov

This only happens when the redisBeacon is on! For now I disabled redis and then its working fine.

Gekko with or without this fix?

@DB-Alex
Copy link
Contributor Author

DB-Alex commented Sep 4, 2018

It happens without the fix and redis on very fast. With the fix and redis on it still happens but it takes longer for the error to appear.

@askmike
Copy link
Owner

askmike commented Sep 4, 2018

Looking at the stack trace you shared this error gets thrown async after the disconnect call. Else we could simply wrap the disconnect in a try/catch. Seems we are not the only ones with this problem, I could find this less than ideal solution: https://stackoverflow.com/a/18753988/843033

With the fix and redis on it still happens but it takes longer for the error to appear.

Sounds like a race condition, it might be that during the if check the client is connected but by the time it actually tries to disconnect it isn't anymore.

@DB-Alex
Copy link
Contributor Author

DB-Alex commented Sep 4, 2018

Nice work! I think if its a race condition it should fail silently and not make it crash the whole UI.

@askmike
Copy link
Owner

askmike commented Sep 4, 2018

agreed, but is pretty much nodejs acting a bit strange. I suggest we merge this since it already improved the behaviour. And after that: we could do some testing to see if the child process fires more messages (in which case gekko would try to disconnect them multiple times). However I can't reproduce this as is..

@askmike askmike merged commit 4fcfb45 into askmike:develop Sep 4, 2018
This was referenced Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants