linting fixes

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
2019-12-03 22:59:44 +03:00
parent 7d5bdcf993
commit a1eaf9cc20
41 changed files with 76 additions and 80 deletions

View File

@@ -178,7 +178,7 @@ func (g *grpcServer) handler(srv interface{}, stream grpc.ServerStream) error {
fullMethod, ok := grpc.MethodFromServerStream(stream)
if !ok {
return grpc.Errorf(codes.Internal, "method does not exist in context")
return status.Errorf(codes.Internal, "method does not exist in context")
}
serviceName, methodName, err := mgrpc.ServiceMethod(fullMethod)

View File

@@ -880,13 +880,10 @@ func (s *rpcServer) Stop() error {
ch := make(chan error)
s.exit <- ch
var err error
select {
case err = <-ch:
s.Lock()
s.started = false
s.Unlock()
}
err := <-ch
s.Lock()
s.started = false
s.Unlock()
return err
}