This commit is contained in:
crusader 2018-03-23 02:23:26 +09:00
parent 1e7be8bc07
commit b040fbf794

View File

@ -2,6 +2,7 @@ package service
import ( import (
"reflect" "reflect"
"sync"
cda "git.loafle.net/commons_go/di/annotation" cda "git.loafle.net/commons_go/di/annotation"
cdr "git.loafle.net/commons_go/di/registry" cdr "git.loafle.net/commons_go/di/registry"
@ -16,9 +17,12 @@ type ProbeService struct {
cda.TypeAnnotation `annotation:"@overFlow:Service()"` cda.TypeAnnotation `annotation:"@overFlow:Service()"`
RPCServlet cr.Servlet RPCServlet cr.Servlet
sendMtx sync.RWMutex
} }
func (ps *ProbeService) Send(method string, params ...interface{}) error { func (ps *ProbeService) Send(method string, params ...interface{}) error {
ps.sendMtx.RLock()
defer ps.sendMtx.RUnlock()
return ps.RPCServlet.Send(method, params...) return ps.RPCServlet.Send(method, params...)
} }