citronneur / node-rdpjs

Remote Desktop Protocol for Node.js
GNU General Public License v3.0
887 stars 154 forks source link

Unable to close connection cleanly #8

Open untoldone opened 8 years ago

untoldone commented 8 years ago

Sorry if this isn't a bug, but I wasn't able to figure out if my usage was incorrect given the README:

var rdp = require('node-rdpjs'),
    config = require('./config');

var client = rdp.createClient({ 
    domain : config.rdpDomain, 
    userName : config.rdpUsername,
    password : config.rdpPassword,
    enablePerf : true,
    autoLogin : true,
    decompress : false,
    screen : { width : 1200, height : 1024 },
    locale : 'en',
    logLevel : 'INFO'
}).on('connect', function () {
  console.log("Connected");
  setTimeout(function () {
    console.log("closing");
    client.close();
  }, 3000);
}).on('close', function() {
}).on('bitmap', function(bitmap) {
}).on('error', function(err) {
}).connect(config.rdpHost, config.rdpPort);

Generates the following output:

[15:00][Michaels-MacBook-Pro:rdp-collection]$ node index.js
[node-rdpjs] INFO:  screen 1200x1024
[node-rdpjs] INFO:  english keyboard layout
[node-rdpjs] INFO:  connect to 192.168.50.201:3389
[node-rdpjs] INFO:  SSL standard security selected
[node-rdpjs] WARN:  Error: UNABLE_TO_VERIFY_LEAF_SIGNATURE
Connected
closing
[node-rdpjs] ERROR: ECONNRESET(read ECONNRESET)
Error: read ECONNRESET
    at errnoException (net.js:904:11)
    at TCP.onread (net.js:558:19)
[node-rdpjs] ERROR: ECONNRESET(read ECONNRESET)
Error: read ECONNRESET
    at errnoException (net.js:904:11)
    at TCP.onread (net.js:558:19)
[15:01][Michaels-MacBook-Pro:rdp-collection]$

Am I doing something unexpected here that causes an unclean close? Would any other debugging info be helpful?

iptop commented 8 years ago

@untoldone I also appear this kind of situation,The problem is solved now?

untoldone commented 8 years ago

Nope, this still happens for me as well.