various fixes (#1267)
* logger: remove Panic log level Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * server/grpc: add missing Unlock in Subscribe error Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * server: minor code change Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * server/grpc: extend test suite with pub/sub testing Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * server/grpc: fix invalid check and allow subscriber error to be returned Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * server/grpc: add pubsub tests Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org> * client/grpc: check for nil req/rsp Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
parent
301bb127ce
commit
cb22a88ba3
5
grpc.go
5
grpc.go
@ -383,6 +383,11 @@ func (g *grpcClient) NewRequest(service, method string, req interface{}, reqOpts
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (g *grpcClient) Call(ctx context.Context, req client.Request, rsp interface{}, opts ...client.CallOption) error {
|
func (g *grpcClient) Call(ctx context.Context, req client.Request, rsp interface{}, opts ...client.CallOption) error {
|
||||||
|
if req == nil {
|
||||||
|
return errors.InternalServerError("go.micro.client", "req is nil")
|
||||||
|
} else if rsp == nil {
|
||||||
|
return errors.InternalServerError("go.micro.client", "rsp is nil")
|
||||||
|
}
|
||||||
// make a copy of call opts
|
// make a copy of call opts
|
||||||
callOpts := g.opts.CallOptions
|
callOpts := g.opts.CallOptions
|
||||||
for _, opt := range opts {
|
for _, opt := range opts {
|
||||||
|
Loading…
Reference in New Issue
Block a user