556 |
|
if (!closed) { |
557 |
|
BufferedSubscription<T> b; |
558 |
|
synchronized (this) { |
559 |
+ |
// no need to re-check closed here |
560 |
|
b = clients; |
561 |
|
clients = null; |
562 |
|
closed = true; |
588 |
|
BufferedSubscription<T> b; |
589 |
|
synchronized (this) { |
590 |
|
b = clients; |
591 |
< |
clients = null; |
592 |
< |
closed = true; |
593 |
< |
closedException = error; |
591 |
> |
if (!closed) { // don't clobber racing close |
592 |
> |
clients = null; |
593 |
> |
closedException = error; |
594 |
> |
closed = true; |
595 |
> |
} |
596 |
|
} |
597 |
|
while (b != null) { |
598 |
|
BufferedSubscription<T> next = b.next; |
1336 |
|
} |
1337 |
|
} |
1338 |
|
} |
1339 |
< |
else if (n < 0L) |
1339 |
> |
else |
1340 |
|
onError(new IllegalArgumentException( |
1341 |
< |
"negative subscription request")); |
1341 |
> |
"non-positive subscription request")); |
1342 |
|
} |
1343 |
|
|
1344 |
|
public final boolean isReleasable() { // for ManagedBlocker |