From b040fbf794a0b0645992b2d8de019db7d3efb0d8 Mon Sep 17 00:00:00 2001 From: crusader Date: Fri, 23 Mar 2018 02:23:26 +0900 Subject: [PATCH] ing --- service/ProbeService.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/service/ProbeService.go b/service/ProbeService.go index e56b4a5..831d4e8 100644 --- a/service/ProbeService.go +++ b/service/ProbeService.go @@ -2,6 +2,7 @@ package service import ( "reflect" + "sync" cda "git.loafle.net/commons_go/di/annotation" cdr "git.loafle.net/commons_go/di/registry" @@ -16,9 +17,12 @@ type ProbeService struct { cda.TypeAnnotation `annotation:"@overFlow:Service()"` RPCServlet cr.Servlet + sendMtx sync.RWMutex } func (ps *ProbeService) Send(method string, params ...interface{}) error { + ps.sendMtx.RLock() + defer ps.sendMtx.RUnlock() return ps.RPCServlet.Send(method, params...) }