- [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();
    }
};
```

stream.subscribe(streamObserver);
                result = new AppResponse(stream.asStreamObserver());
            } else {
                final StreamObserver<Object> streamObserver = (StreamObserver<Object>) inv.getArguments()[1];
                stream.subscribe(streamObserver);
                result = new AppResponse();
                stream.asStreamObserver().onNext(inv.getArguments()[0]);
                stream.asStreamObserver().onCompleted();
            }
            response.setResult(result);
            DefaultFuture2.received(stream.getConnection(), response);
        }
    }
    /**
     * Get the trI protocol special MethodDescriptor
     */
    private MethodDescriptor getTriMethodDescriptor(ConsumerModel consumerModel, RpcInvocation inv) {
        List<MethodDescriptor> methodDescriptors = consumerModel.getServiceModel().getMethods(inv.getMethodName());
        if (CollectionUtils.isEmpty(methodDescriptors)) {
            throw new IllegalStateException("methodDescriptors must not be null method=" + inv.getMethodName());
        }
        for (MethodDescriptor methodDescriptor : methodDescriptors) {
            if (Arrays.equals(inv.getParameterTypes(), methodDescriptor.getRealParameterClasses())) {
                return methodDescriptor;
            }
        }
        throw new IllegalStateException("methodDescriptors must not be null method=" + inv.getMethodName());
    }
}