Skip to content

Commit

Permalink
[Java Client] Remove invalid call to Thread.currentThread().interrupt…
Browse files Browse the repository at this point in the history
…(); (#12652)

- Thread.currentThread().interrupt() shouldn't be called here.
  - it must only be called when handling an InterruptedException.
  - this looks like a copy-paste bug introduced in
    https://github.com/apache/pulsar/pull/731/files#diff-d6fcf8aa2d0035cc386dca0942a452343d6854763c7fd397efa4e660c0069767R1183

(cherry picked from commit b5f78f8)
  • Loading branch information
lhotari authored and eolivelli committed Nov 9, 2021
1 parent fff54d5 commit f849d46
Showing 1 changed file with 0 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1775,7 +1775,6 @@ private void batchMessageAndSend() {
processOpSendMsg(opSendMsg);
}
} catch (PulsarClientException e) {
Thread.currentThread().interrupt();
semaphore.ifPresent(s -> s.release(batchMessageContainer.getNumMessagesInBatch()));
} catch (Throwable t) {
semaphore.ifPresent(s -> s.release(batchMessageContainer.getNumMessagesInBatch()));
Expand Down

0 comments on commit f849d46

Please sign in to comment.