This commit is contained in:
crusader 2018-03-16 15:05:51 +09:00
parent 9fd507f383
commit b91fc70ae8
2 changed files with 2 additions and 2 deletions

View File

@ -13,5 +13,5 @@ const (
ConfigPathFlagName = "config-dir" ConfigPathFlagName = "config-dir"
ConfigFileName = "config.json" ConfigFileName = "config.json"
GRPCUserIDKey = "GRPCUserID" GRPCSessionIDKey = "SESSION_ID"
) )

View File

@ -24,7 +24,7 @@ type GatewayRPCServletHandlers struct {
} }
func (sh *GatewayRPCServletHandlers) Invoke(servletCTX rpc.ServletContext, requestCodec protocol.RegistryCodec) (result interface{}, err error) { func (sh *GatewayRPCServletHandlers) Invoke(servletCTX rpc.ServletContext, requestCodec protocol.RegistryCodec) (result interface{}, err error) {
md := metadata.Pairs(oogw.GRPCUserIDKey, servletCTX.GetAttribute(oogw.SocketIDKey).(string)) md := metadata.Pairs(oogw.GRPCSessionIDKey, servletCTX.GetAttribute(oogw.SocketIDKey).(string))
grpcCTX := metadata.NewOutgoingContext(context.Background(), md) grpcCTX := metadata.NewOutgoingContext(context.Background(), md)
params, err := requestCodec.Params() params, err := requestCodec.Params()