Skip to content
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

An error is thrown if no response after 2 minutes #3

Open
hong6234 opened this issue Dec 3, 2018 · 1 comment
Open

An error is thrown if no response after 2 minutes #3

hong6234 opened this issue Dec 3, 2018 · 1 comment

Comments

@hong6234
Copy link

hong6234 commented Dec 3, 2018

Error: nodeNC failed:\n\nevents.js:167
throw er; // Unhandled 'error' event
Error: read ECONNRESET
at TCP.onStreamRead (internal/stream_base_commons.js:111:27)
Emitted 'error' event at:
at emitErrorNT (internal/streams/destroy.js:82:8)
at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)
at process._tickCallback (internal/process/next_tick.js:63:19)
at sendMessage (D:\root\node_modules\sync-rpc\lib\index.js:130:13)
at D:\root\node_modules\sync-rpc\lib\index.js:159:25
at request (D:\root\node_modules\sync-request\lib\index.js:28:15)
at FuncLib.func_server (D:\root\funclib.js:529:26)
at FuncLib.export_wrap (D:\root\funclib.js:547:31)
at FuncLib.GetPowerPlanGuidByName (D:\root\funclib.js:484:58)
at Object.module.exports.template.Case.step [as step_func] (D:\root\case_scripts\test app\test case 01\main.js:16:39)
at Case.run (D:\root\template.js:183:35)
at Object. (d:\root\run_script.js:4:10)
at Module._compile (internal/modules/cjs/loader.js:685:14

@hong6234 hong6234 changed the title An error is thrown if no response within 2 minutes An error is thrown if no response after 2 minutes Dec 3, 2018
@hong6234
Copy link
Author

hong6234 commented Dec 3, 2018

I fix it myself.
by append setKeepAlive(true) to nodeNetCatSrc in index.js
function nodeNetCatSrc(port, input) { return ( "var c=require('net').connect(" + port + ",'127.0.0.1',()=>{c.pipe(process.stdout);c.end(" + JSON.stringify(input) .replace(/\u2028/g, '\\u2028') .replace(/\u2029/g, '\\u2029') + ')}).setKeepAlive(true);' ); }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant