Skip to content

Commit

Permalink
Fix for #115 DefaultBroadcaster.push contains recursive error
Browse files Browse the repository at this point in the history
  • Loading branch information
jfarcand committed Mar 30, 2012
1 parent fb2609b commit b9c26bc
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,10 @@ protected void start() {
}

protected void push(Entry entry) {
push(entry, true);
}

protected void push(Entry entry, boolean rec) {

if (destroyed.get()) {
return;
Expand All @@ -542,7 +546,7 @@ protected void push(Entry entry) {
recentActivity.set(true);

String prevMessage = entry.message.toString();
if (!delayedBroadcast.isEmpty()) {
if (rec && !delayedBroadcast.isEmpty()) {
Iterator<Entry> i = delayedBroadcast.iterator();
StringBuilder b = new StringBuilder();
while (i.hasNext()) {
Expand All @@ -554,7 +558,7 @@ protected void push(Entry entry) {
&& entry.message instanceof String) {
b.append(e.message);
} else {
push(e);
push(e, false);
}
} finally {
i.remove();
Expand Down

0 comments on commit b9c26bc

Please sign in to comment.