Skip to content

Commit

Permalink
Update Connection.java
Browse files Browse the repository at this point in the history
修复 Queue full错误
brainlag#50
  • Loading branch information
yuexinok authored Dec 29, 2020
1 parent 6fc435f commit 9eb131b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/github/brainlag/nsq/Connection.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,17 @@ public void incoming(final NSQFrame frame) {
return;
}
}


if (frame instanceof ErrorFrame) {
if (errorCallback != null) {
errorCallback.error(NSQException.of((ErrorFrame) frame));
}
responses.add(frame);
try {
this.responses.offer(frame, 1, TimeUnit.SECONDS);
} catch (InterruptedException e) {
log.error("Dropping incoming frame error", e);
}
return;
}

Expand Down

0 comments on commit 9eb131b

Please sign in to comment.