Skip to content

Commit

Permalink
Fixed unregisterInternal to skip PollItems which were nulled by a pre…
Browse files Browse the repository at this point in the history
…vious unregisterInternal.
  • Loading branch information
svirpridon committed Apr 12, 2013
1 parent 97e6d71 commit df60582
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/org/zeromq/ZMQ.java
Original file line number Diff line number Diff line change
Expand Up @@ -1645,6 +1645,9 @@ public void unregister(SelectableChannel channel) {
private void unregisterInternal(Object socket) {
for (int i = 0; i < this.next; ++i) {
PollItem item = this.items[i];
if (item == null) {
continue;
}
if (item.socket == socket || item.channel == socket) {
this.items[i] = null;

Expand Down

0 comments on commit df60582

Please sign in to comment.