|
37 | 37 | import kotlin.reflect.jvm.KCallablesJvm;
|
38 | 38 | import kotlin.reflect.jvm.ReflectJvmMapping;
|
39 | 39 | import org.jspecify.annotations.Nullable;
|
| 40 | +import org.reactivestreams.Publisher; |
40 | 41 | import reactor.core.publisher.Mono;
|
41 | 42 | import reactor.core.publisher.SynchronousSink;
|
42 | 43 | import reactor.core.scheduler.Scheduler;
|
@@ -332,7 +333,7 @@ private static class KotlinDelegate {
|
332 | 333 |
|
333 | 334 | if (isSuspendingFunction) {
|
334 | 335 | Object coroutineContext = exchange.getAttribute(COROUTINE_CONTEXT_ATTRIBUTE);
|
335 | | - Object result = (coroutineContext == null ? CoroutinesUtils.invokeSuspendingFunction(method, target, args) : |
| 336 | + Publisher<?> result = (coroutineContext == null ? CoroutinesUtils.invokeSuspendingFunction(method, target, args) : |
336 | 337 | CoroutinesUtils.invokeSuspendingFunction((CoroutineContext) coroutineContext, method, target, args));
|
337 | 338 | return (result instanceof Mono<?> mono ? mono.handle(KotlinDelegate::handleResult) : result);
|
338 | 339 | }
|
|
0 commit comments