Skip to content

Commit

Permalink
Merge pull request #199 from jasondana/offline-close
Browse files Browse the repository at this point in the history
Only close SocketWatcher when capturing live
  • Loading branch information
Assel Meher committed Feb 6, 2016
2 parents cfba7be + 61ed979 commit 4634a39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pcap.js
Expand Up @@ -102,7 +102,9 @@ PcapSession.prototype.on_packet_ready = function () {
PcapSession.prototype.close = function () {
this.opened = false;
this.session.close();
this.readWatcher.stop();
if (this.is_live) {
this.readWatcher.stop();
}
// TODO - remove listeners so program will exit I guess?
};

Expand Down

0 comments on commit 4634a39

Please sign in to comment.