alexwhitman / node-pushbullet-api

PushBullet API module for Node.js
165 stars 36 forks source link

Stream close is not working #40

Closed axfree closed 5 years ago

axfree commented 5 years ago

This simple test code hangs the process forever.

// pb.js
var PushBullet = require('pushbullet');

var pusher = new PushBullet(‘…’);

var stream = pusher.stream();
stream.on('connect', function() {
    console.log('connected');
    stream.close();
});
stream.on('close', function() {
    console.log('closed');
});
stream.connect();
$ node pb.js
connected
<< process hangs here >>
alexwhitman commented 5 years ago

Fixed in 2.3.0. Thanks for the contribution in the PR.