File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
spring-web/src/main/java/org/springframework/http/codec/multipart Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -209,6 +209,7 @@ void emitError(Throwable t) {
209
209
210
210
void requestToken () {
211
211
if (upstream () != null &&
212
+ this .state .get ().canRequest () &&
212
213
this .requestOutstanding .compareAndSet (false , true )) {
213
214
request (1 );
214
215
}
@@ -252,6 +253,13 @@ private interface State {
252
253
default void error (Throwable throwable ) {
253
254
}
254
255
256
+ /**
257
+ * Indicates whether the current state is ready to accept a new token.
258
+ */
259
+ default boolean canRequest () {
260
+ return true ;
261
+ }
262
+
255
263
/**
256
264
* Cleans up any state.
257
265
*/
@@ -755,6 +763,11 @@ private Mono<Void> writeInternal(DataBuffer dataBuffer) {
755
763
}
756
764
}
757
765
766
+ @ Override
767
+ public boolean canRequest () {
768
+ return false ;
769
+ }
770
+
758
771
@ Override
759
772
public void dispose () {
760
773
this .disposed = true ;
You can’t perform that action at this time.
0 commit comments