Skip to content

Commit 9a18cdc

Browse files
committed
Web Client: use request promise bound to the creating context (#2703)
This guarantees that request promise callbacks will always be invoked on the right context. Signed-off-by: Thomas Segismont <[email protected]> # Conflicts: # vertx-web-client/src/main/java/io/vertx/ext/web/client/impl/HttpContext.java
1 parent 5862b72 commit 9a18cdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vertx-web-client/src/main/java/io/vertx/ext/web/client/impl/HttpContext.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@
2222
import io.vertx.core.http.HttpClientResponse;
2323
import io.vertx.core.http.HttpHeaders;
2424
import io.vertx.core.http.RequestOptions;
25-
import io.vertx.core.internal.http.HttpClientInternal;
2625
import io.vertx.core.internal.ContextInternal;
2726
import io.vertx.core.internal.PromiseInternal;
27+
import io.vertx.core.internal.http.HttpClientInternal;
2828
import io.vertx.core.json.Json;
2929
import io.vertx.core.json.JsonObject;
3030
import io.vertx.core.streams.Pipe;
@@ -430,7 +430,7 @@ private void handlePrepareRequest() {
430430
}
431431

432432
private void handleCreateRequest() {
433-
requestPromise = Promise.promise();
433+
requestPromise = context.promise();
434434
if (body != null || "application/json".equals(contentType)) {
435435
if (body instanceof MultipartForm) {
436436
MultipartFormUpload multipartForm;

0 commit comments

Comments
 (0)