diff --git a/native/src/main/java/io/ballerina/stdlib/http/api/HttpCallableUnitCallback.java b/native/src/main/java/io/ballerina/stdlib/http/api/HttpCallableUnitCallback.java index 35eb40cc3..d32d5e45a 100644 --- a/native/src/main/java/io/ballerina/stdlib/http/api/HttpCallableUnitCallback.java +++ b/native/src/main/java/io/ballerina/stdlib/http/api/HttpCallableUnitCallback.java @@ -117,7 +117,7 @@ private void returnErrorResponse(BError error) { public void invokeBalMethod(Object[] paramFeed, String methodName) { Thread.startVirtualThread(() -> { try { - StrandMetadata metaData = new StrandMetadata(false, null); + StrandMetadata metaData = new StrandMetadata(true, null); runtime.callMethod(caller, methodName, metaData, paramFeed); stopObserverContext(); } catch (BError error) { diff --git a/native/src/main/java/io/ballerina/stdlib/http/api/HttpRequestInterceptorUnitCallback.java b/native/src/main/java/io/ballerina/stdlib/http/api/HttpRequestInterceptorUnitCallback.java index 768df2b27..091ff1607 100644 --- a/native/src/main/java/io/ballerina/stdlib/http/api/HttpRequestInterceptorUnitCallback.java +++ b/native/src/main/java/io/ballerina/stdlib/http/api/HttpRequestInterceptorUnitCallback.java @@ -171,7 +171,7 @@ private void returnResponse(Object result) { public void invokeBalMethod(Object[] paramFeed, String methodName) { Thread.startVirtualThread(() -> { try { - StrandMetadata metaData = new StrandMetadata(false, null); + StrandMetadata metaData = new StrandMetadata(true, null); runtime.callMethod(caller, methodName, metaData, paramFeed); } catch (BError error) { cleanupRequestMessage();