{"action":"created","issue":{"url":"https://api.github.com/repos/mkozjak/node-telnet-client/issues/111","repository_url":"https://api.github.com/repos/mkozjak/node-telnet-client","labels_url":"https://api.github.com/repos/mkozjak/node-telnet-client/issues/111/labels{/name}","comments_url":"https://api.github.com/repos/mkozjak/node-telnet-client/issues/111/comments","events_url":"https://api.github.com/repos/mkozjak/node-telnet-client/issues/111/events","html_url":"https://github.com/mkozjak/node-telnet-client/issues/111","id":322552522,"number":111,"title":"reboot modem","user":{"login":"reznikGit","id":35624910,"avatar_url":"https://avatars3.githubusercontent.com/u/35624910?v=4","gravatar_id":"","url":"https://api.github.com/users/reznikGit","html_url":"https://github.com/reznikGit","followers_url":"https://api.github.com/users/reznikGit/followers","following_url":"https://api.github.com/users/reznikGit/following{/other_user}","gists_url":"https://api.github.com/users/reznikGit/gists{/gist_id}","starred_url":"https://api.github.com/users/reznikGit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reznikGit/subscriptions","organizations_url":"https://api.github.com/users/reznikGit/orgs","repos_url":"https://api.github.com/users/reznikGit/repos","events_url":"https://api.github.com/users/reznikGit/events{/privacy}","received_events_url":"https://api.github.com/users/reznikGit/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-05-13T00:15:22Z","updated_at":"2018-05-14T13:36:21Z","closed_at":null,"author_association":"NONE","body":"> async function modemReboot() {\r\n>     const connection = new Telnet();\r\n>     const params = {\r\n>         host: \"192.168.8.1\",\r\n>         port: 23,\r\n>         shellPrompt: \"/ # \",\r\n>         timeout: 1000\r\n>     };\r\n> \r\n>     await connection.connect(params);\r\n>     await connection.exec(\"reboot\").catch(_.noop);\r\n>     await connection.destroy();\r\n> }\r\n\r\nHi, i want connect to my modem e3370, and reboot it.\r\nOn my pc - this code work good, but in my notebook i have error.\r\n\r\n\r\n> events.js:167\r\n>       throw er; // Unhandled 'error' event\r\n>       ^\r\n> \r\n> Error: read ECONNRESET\r\n>     at TCP.onread (net.js:659:25)\r\n> Emitted 'error' event at:\r\n>     at Socket.socket.on.error (D:\\modem\\node_modules\\telnet-client\\lib\\index.js:129:22)\r\n>     at Socket.emit (events.js:182:13)\r\n>     at emitErrorNT (internal/streams/destroy.js:82:8)\r\n>     at emitErrorAndCloseNT (internal/streams/destroy.js:50:3)\r\n>     at process._tickCallback (internal/process/next_tick.js:63:19)\r\n\r\n\r\nSay me pls, how i can fix it. Add try/catch - not work"},"comment":{"url":"https://api.github.com/repos/mkozjak/node-telnet-client/issues/comments/388818784","html_url":"https://github.com/mkozjak/node-telnet-client/issues/111#issuecomment-388818784","issue_url":"https://api.github.com/repos/mkozjak/node-telnet-client/issues/111","id":388818784,"user":{"login":"mkozjak","id":3506172,"avatar_url":"https://avatars1.githubusercontent.com/u/3506172?v=4","gravatar_id":"","url":"https://api.github.com/users/mkozjak","html_url":"https://github.com/mkozjak","followers_url":"https://api.github.com/users/mkozjak/followers","following_url":"https://api.github.com/users/mkozjak/following{/other_user}","gists_url":"https://api.github.com/users/mkozjak/gists{/gist_id}","starred_url":"https://api.github.com/users/mkozjak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mkozjak/subscriptions","organizations_url":"https://api.github.com/users/mkozjak/orgs","repos_url":"https://api.github.com/users/mkozjak/repos","events_url":"https://api.github.com/users/mkozjak/events{/privacy}","received_events_url":"https://api.github.com/users/mkozjak/received_events","type":"User","site_admin":false},"created_at":"2018-05-14T13:36:21Z","updated_at":"2018-05-14T13:36:21Z","author_association":"OWNER","body":"Yes, the problem might be in a wrong shellPrompt. It will not work if you unset that option."}}
{"actor":{"display_login":"mkozjak"}}