diff --git a/servlet/webapp/gateway_rpc_handlers.go b/servlet/webapp/gateway_rpc_handlers.go index 2759109..9527ed1 100644 --- a/servlet/webapp/gateway_rpc_handlers.go +++ b/servlet/webapp/gateway_rpc_handlers.go @@ -87,6 +87,8 @@ func (sh *GatewayRPCHandlers) Handshake(socketCTX cwf.SocketContext, ctx *fastht socketCTX.SetAttribute(oogw.ClientTypeKey, oogw.MEMBER) socketCTX.SetAttribute(oogw.TargetIDKey, userEmail) + logging.Logger().Debugf("Webapp: Client sessionID %s", sessionID) + return sessionID, nil } diff --git a/servlet/webapp/subscriber_handlers.go b/servlet/webapp/subscriber_handlers.go index 3258dce..9ff6d10 100644 --- a/servlet/webapp/subscriber_handlers.go +++ b/servlet/webapp/subscriber_handlers.go @@ -32,14 +32,18 @@ func (sh *SubscriberHandlers) OnSubscribe(channel string, message oos.SubscribeM } for _, soc := range sockets { - soc.WriteMessage(websocket.TextMessage, message.Message) + if err := soc.WriteMessageUseWriter(websocket.TextMessage, message.Message); nil != err { + logging.Logger().Errorf("OnSubscribe: write error %v", err) + } } } case oos.MEMBER_SESSION: for _, sid := range message.Targets { if soc := sh.GetSocket(sid); 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: