- [x] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
- [x] I have checked the [FAQ](https://github.com/apache/dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

Because of TripleClientHandler working in a new thread, The line `url.getServiceMode`  doesn't work in TripleClientHandler with InstanceAddressURL when we try to use application-service-discovery.
```java
// => org.apache.dubbo.rpc.protocol.tri.TripleClientHandler#writeRequest
private void writeRequest(ChannelHandlerContext ctx, final Request req, final ChannelPromise promise) {
    final RpcInvocation inv = (RpcInvocation) req.getData();
    final URL url = inv.getInvoker().getUrl();
    // Here will throw NPE
    ConsumerModel consumerModel = (ConsumerModel) url.getServiceModel();
    // ......
}
```

See InstanceAddressURL:
```java
// => org.apache.dubbo.registry.client.InstanceAddressURL#getServiceModel
public ServiceModel getServiceModel() {
    return RpcContext.getServiceContext().getConsumerUrl().getServiceModel();
}

// => org.apache.dubbo.rpc.RpcContext
private static final InternalThreadLocal<RpcServiceContext> SERVICE_CONTEXT = new InternalThreadLocal<RpcServiceContext>() {
    @Override
    protected RpcServiceContext initialValue() {
        return new RpcServiceContext();
    }
};
```

req.setVersion(Version.getProtocolVersion());
            req.setTwoWay(true);
            req.setData(inv);
            
            connection.isAvailable();
            DefaultFuture2 future = DefaultFuture2.newFuture(this.connection, req, timeout, executor);
            final CompletableFuture<AppResponse> respFuture = future.thenApply(obj -> (AppResponse) obj);
            
            FutureContext.getContext().setCompatibleFuture(respFuture);
            AsyncRpcResult result = new AsyncRpcResult(respFuture, inv);
            result.setExecutor(executor);
            if (!connection.isAvailable()) {
                Response response = new Response(req.getId(), req.getVersion());
                response.setStatus(Response.CHANNEL_INACTIVE);
                response.setErrorMessage(String.format("Connect to %s failed", this));
                DefaultFuture2.received(connection, response);
            } else {
                final ChannelFuture writeFuture = this.connection.write(req);
                writeFuture.addListener(future1 -> {
                    if (future1.isSuccess()) {
                        DefaultFuture2.sent(req);
                    } else {
                        Response response = new Response(req.getId(), req.getVersion());
                        response.setStatus(Response.CHANNEL_INACTIVE);
                        response.setErrorMessage(StringUtils.toString(future1.cause()));
                        DefaultFuture2.received(connection, response);
                    }
                });
            }
            return result;