New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows socket and named pipe servers don't work in main process #1968
Comments
It looks like this fails for TCP servers as well. Updating bug title to match.
|
Seems like a bug of Node.js integration. |
This patch appears to fix the problem, but I don't know enough about how the integration works to say if it has other consequences. The interesting thing is that this now looks a lot like the Mac and Linux node integrations. Note that uv_backend_timeout might return -1 here. I noticed that the Linux node integration doesn't handle a -1, but the Mac one does. I think that the appropriate action on Windows would be to treat a -1 as the Windows constant 'INFINITE'. If you think this is the right approach, I can turn it into a pull request:
|
@zcbenz Quick ping -- what do you think of the patch I've suggested here? |
@mmastrac Doing that used to cause timers not working when we used Node 0.10.x in old days, but it seems to work perfectly now. I'll include this patch in next release and see if it breaks things. |
@zcbenz thanks! |
@mmastrac Can you send a PR for it? |
Closed by #2545. |
@mmastrac Hi! I'm afraid this is still broken here on Windows 10 Home, using the same testcase: var net = require('net')
var client = net.createConnection({ path: '\\\\.\\pipe\\mypipe', function () { console.log('connected') }) This works ("connected" is printed) when run as a script executed by node v5.1.1, but fails (hangs forever) when executed by Electron v0.36.0, which includes your fix. Looking at the Anything I can do to help debug? |
@cjb interesting. I haven't had a chance to test this stuff lately but it's possible something else broke. Are you set up to compile the latest from source? What does the output look like from my test case exactly? |
Reopening as this problem is happening again per microsoft/vscode#142786. |
I've been tracking down a bug in a program that works in OSX but fails mysteriously in Windows. I've pared down a minimal repro case to the
net.createConnection
/net.createServer
APIs w/ a named pipe failing when run in the main atom process.If you specify
ATOM_SHELL_INTERNAL_RUN_AS_NODE=1
for both ends of the test it will function as you'd expect. If either one (or both) areATOM_SHELL_INTERNAL_RUN_AS_NODE=0
, the repro will hang in the middle of the test and fail to continue the ping/pong cycle.Reproduction steps (tested on Win7/32 w/electron-v0.28.0-win32-ia32):
repro.js
electron.exe repro.js
electron.exe repro.js client
What happens:
What I expect to happen:
The text was updated successfully, but these errors were encountered: