summaryrefslogtreecommitdiff
path: root/service/http/rpc.go
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2018-09-10 16:42:15 +0400
committerGitHub <[email protected]>2018-09-10 16:42:15 +0400
commita554a98dda0d793da09db17314ef3977a2f3a465 (patch)
tree64b506898d283c39babc48da5a29df203cb57b49 /service/http/rpc.go
parentea97c188a4a74c00b585cb50fa1ed4db7d190e09 (diff)
parent46a06a4d104802fb4271e06da487f74f23edd10c (diff)
Merge pull request #33 from spiral/feature/env-setterv1.2.0
Feature/env setter
Diffstat (limited to 'service/http/rpc.go')
-rw-r--r--service/http/rpc.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/service/http/rpc.go b/service/http/rpc.go
index aebc5903..9dfe718e 100644
--- a/service/http/rpc.go
+++ b/service/http/rpc.go
@@ -29,7 +29,7 @@ type Worker struct {
// Reset resets underlying RR worker pool and restarts all of it's workers.
func (rpc *rpcServer) Reset(reset bool, r *string) error {
- if rpc.svc.srv == nil {
+ if rpc.svc == nil || rpc.svc.srv == nil {
return errors.New("http server is not running")
}
@@ -39,7 +39,7 @@ func (rpc *rpcServer) Reset(reset bool, r *string) error {
// Workers returns list of active workers and their stats.
func (rpc *rpcServer) Workers(list bool, r *WorkerList) error {
- if rpc.svc.srv == nil {
+ if rpc.svc == nil || rpc.svc.srv == nil {
return errors.New("http server is not running")
}