Repository navigation
[windows] [readline] [https] Closing input halts event loop #21771
Description
Activity
- changed the title
[-][windows] [readline] [https] Closing input causes requests to freeze[/-][+][windows] [readline] [https] Closing input halts event loop[/+]on Jul 11, 2018 Cannot reproduce on
10.6.0Hm.. while I get those
(same loop)and(future loop)messages, Node does not exit until I hit enter.@bzoz What OS and version of OS are you on?
Also, do you ever see "TWO completed the request"?
Win10 17134.165
@coolaj86, are you maybe using ConEmu or some other console emulator?
Windows Server 2016 Datacenter v1607 is also affected, with node v10.13.0 and 11.2, on both commdand prompt and powershell
Both the suggested workarounds fix this issue
- addedwindowsIssues and PRs related to the Windows platform.Issues and PRs related to the Windows platform.readlineIssues and PRs related to the built-in readline module.Issues and PRs related to the built-in readline module.httpsIssues and PRs related to the https subsystem.Issues and PRs related to the https subsystem.
on Nov 29, 2018 - addedstreamIssues and PRs related to Node.js streams.Issues and PRs related to Node.js streams.
on Dec 14, 2019 @ronag this seems streams related and I guess you might want to have a look at this.
Reacted by Robert Nagy@BridgeAR I wouldn't mind looking into this but I don't have a Windows setup anymore. Any advice in regards to how to have a virtual setup? Is there a any online service which could just give me a e.g. a ssh to windows machine?
@ronag I can provide you a virtual machine (VirtualBox or VMWare) with Windows operating system installed (I have almost any Windows version from Windows 95 to the latest Windows 10). Just let me know which Windows version you want and how much RAM and HDD space the virtual machine should have so that you can run it smoothly on your system.
@Hakerh400: Much appreciated! A Windows 10 with 1G ram and 64 GB HDD should be enough.
Username:
user
Password:passReacted by Robert Nagy and John Kalberer+1 - Still an issue on node v12.16.3/Windows 10/Powershell
#30701
Node 14.6 has fixed this problem.huseyinacacak-janea commented
on Sep 4, 2024 ContributorMore actionsI've investigated this issue with Node v18.20.2, v20.16.0 and v22.7.0. All of them worked as expected.
@coolaj86 Do you think this can be closed as this issue is now fixed in the current versions of Node?Reacted by Aviv KellerPer the comment above.
It turns out that if you have
readlineopen as a terminal, ask a question, make an http request, then close readline, the even loop appears to halt on the next http request.No error. No timeout. Just sits there for minutes or hours or days.
Does not affect Mac or Linux, just Windows.
Took me a few hours of debugging over a few days to figure out that I wasn't doing anything wrong in my code and then reduce it down far enough to produce an isolated test case that proves I'm not going insane. :)
Possibly related bugs
Possible workarounds
terminal: falserl.close()