example: connect with SHARED share_mode

- This way the example works both in Linux and OS X. See:
  https://github.com/santigimeno/node-pcsclite/issues/14#issuecomment-56665208
This commit is contained in:
Santiago Gimeno
2014-09-24 16:15:11 +02:00
parent 921da53559
commit 44b0c3e479
2 changed files with 8 additions and 9 deletions

View File

@@ -25,7 +25,7 @@ pcsc.on('reader', function(reader) {
});
} else if ((changes & this.SCARD_STATE_PRESENT) && (status.state & this.SCARD_STATE_PRESENT)) {
console.log("card inserted");/* card inserted */
reader.connect(function(err, protocol) {
reader.connect({ share_mode : this.SCARD_SHARE_SHARED }, function(err, protocol) {
if (err) {
console.log(err);
} else {