block -> subscribe

This commit is contained in:
huangsimin 2019-08-08 13:44:09 +08:00
parent 0e0366e8bb
commit d66713f15e

View File

@ -142,12 +142,12 @@ public class DubboGatewayFilterFactory extends AbstractGatewayFilterFactory<Dubb
if (result.getClass() != String.class) {
response.writeWith(Mono.just(response.bufferFactory()
.wrap(ByteBuffer.wrap(JSON.toJSONString(result).getBytes())))).block();
.wrap(ByteBuffer.wrap(JSON.toJSONString(result).getBytes())))).subscribe();
return;
}
response.writeWith(Mono.just(
response.bufferFactory().wrap(ByteBuffer.wrap(((String) result).getBytes())))).block();
response.bufferFactory().wrap(ByteBuffer.wrap(((String) result).getBytes())))).subscribe();
return;
}
@ -156,7 +156,7 @@ public class DubboGatewayFilterFactory extends AbstractGatewayFilterFactory<Dubb
result = statusCode.getReasonPhrase();
response.writeWith(Mono.just(
response.bufferFactory().wrap(ByteBuffer.wrap(((String) result).getBytes())))).block();
response.bufferFactory().wrap(ByteBuffer.wrap(((String) result).getBytes())))).subscribe();
return;
}));
}