Merge
This commit is contained in:
commit
76e0d7cf28
@ -588,6 +588,7 @@ public class SubmissionPublisher<T> implements Flow.Publisher<T>,
|
||||
if (!closed) {
|
||||
BufferedSubscription<T> b;
|
||||
synchronized (this) {
|
||||
// no need to re-check closed here
|
||||
b = clients;
|
||||
clients = null;
|
||||
closed = true;
|
||||
@ -619,9 +620,11 @@ public class SubmissionPublisher<T> implements Flow.Publisher<T>,
|
||||
BufferedSubscription<T> b;
|
||||
synchronized (this) {
|
||||
b = clients;
|
||||
clients = null;
|
||||
closed = true;
|
||||
closedException = error;
|
||||
if (!closed) { // don't clobber racing close
|
||||
clients = null;
|
||||
closedException = error;
|
||||
closed = true;
|
||||
}
|
||||
}
|
||||
while (b != null) {
|
||||
BufferedSubscription<T> next = b.next;
|
||||
|
Loading…
Reference in New Issue
Block a user