This commit is contained in:
crusader 2018-03-23 01:10:27 +09:00
parent 18845c4ff9
commit ef1a27ab6c

View File

@ -25,7 +25,9 @@ func (sh *SubscriberHandlers) OnSubscribe(channel string, message oos.SubscribeM
case oos.PROBE: case oos.PROBE:
for _, pid := range message.Targets { for _, pid := range message.Targets {
if soc := sh.GetSocket(pid); nil != soc { if soc := sh.GetSocket(pid); nil != soc {
soc.WriteMessage(websocket.TextMessage, message.Message) if err := soc.WriteMessageUseWriter(websocket.TextMessage, message.Message); nil != err {
logging.Logger().Errorf("OnSubscribe: write error %v", err)
}
} }
} }
default: default: