Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
avoid publishing to a closed ascoltatore
Browse files Browse the repository at this point in the history
  • Loading branch information
root committed Mar 22, 2016
1 parent 19634f4 commit 983440a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/kafka_ascoltatore.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,9 @@ KafkaAscoltatore.prototype._startConn = function(cb) {
if(message.value && encoding !== "buffer"){
value = message.value.toString(encoding);
}
that._ascoltatore.publish(that._recvTopic(message.topic), value);
if(that._ascoltatore._closed !== true){
that._ascoltatore.publish(that._recvTopic(message.topic), value);
}
};
publish();
});
Expand Down

0 comments on commit 983440a

Please sign in to comment.