Skip to content

Commit

Permalink
Only close SocketWatcher when capturing live
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Dana committed Feb 5, 2016
1 parent fff6919 commit 61ed979
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 61ed979

Please sign in to comment.