|
|
@@ -419,8 +419,8 @@ func (h *Hub) requestFromNet(request *RequestData) {
|
|
|
// 返回没有匹配的消息
|
|
|
request.conn.sendResponse <- &ResponseData{
|
|
|
Id: request.Id,
|
|
|
- State: config.NO_MATCH,
|
|
|
- Data: fmt.Appendf(nil, "[%s] %s %s", config.IdMsg(config.NO_MATCH), channel, cmd),
|
|
|
+ State: config.NO_MATCH_CMD,
|
|
|
+ Data: fmt.Appendf(nil, "[%s] Channel: %s, Cmd: %s", config.IdMsg(config.NO_MATCH_CMD), channel, cmd),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -493,8 +493,8 @@ func (h *Hub) Get(filter FilterFunc, cmd string, data any, backFunc GetBackFunc)
|
|
|
func (h *Hub) GetOneWithStruct(gd *GetData) (response *ResponseData) {
|
|
|
if gd.Filter == nil {
|
|
|
return &ResponseData{
|
|
|
- State: config.CONNECT_NO_MATCH,
|
|
|
- Data: fmt.Appendf(nil, "[%s] not filter function", config.IdMsg(config.CONNECT_NO_MATCH)),
|
|
|
+ State: config.NO_MATCH_FILTER,
|
|
|
+ Data: fmt.Appendf(nil, "[%s] not filter function", config.IdMsg(config.NO_MATCH_FILTER)),
|
|
|
}
|
|
|
}
|
|
|
gd.Max = 1
|
|
|
@@ -504,8 +504,8 @@ func (h *Hub) GetOneWithStruct(gd *GetData) (response *ResponseData) {
|
|
|
})
|
|
|
if response == nil {
|
|
|
return &ResponseData{
|
|
|
- State: config.CONNECT_NO_MATCH,
|
|
|
- Data: fmt.Appendf(nil, "[%s] %s", config.IdMsg(config.CONNECT_NO_MATCH), gd.Cmd),
|
|
|
+ State: config.NO_MATCH_CONNECT,
|
|
|
+ Data: fmt.Appendf(nil, "[%s] Filter: %s, Cmd: %s", config.IdMsg(config.NO_MATCH_CONNECT), GetFunctionName(gd.Filter), gd.Cmd),
|
|
|
}
|
|
|
}
|
|
|
return
|