|
|
@@ -276,7 +276,7 @@ func (h *Hub) sendRequest(gd *GetData) (count int) {
|
|
|
go h.outResponse(&ResponseData{
|
|
|
Id: id,
|
|
|
State: config.GET_TIMEOUT,
|
|
|
- Data: fmt.Appendf(nil, "[%s] %s %s", config.IdMsg(config.GET_TIMEOUT), conn.channel, gd.Cmd),
|
|
|
+ Data: fmt.Appendf(nil, "[%s] %s %s", IdMsg(config.GET_TIMEOUT), conn.channel, gd.Cmd),
|
|
|
conn: conn,
|
|
|
})
|
|
|
// 检查是否已经很久时间没有使用连接了
|
|
|
@@ -395,7 +395,7 @@ func (h *Hub) requestFromNet(request *RequestData) {
|
|
|
if err != nil {
|
|
|
log.Println(err.Error())
|
|
|
state = config.CONVERT_FAILED
|
|
|
- byteData = fmt.Appendf(nil, "[%s] %s %s", config.IdMsg(config.CONVERT_FAILED), request.conn.channel, request.Cmd)
|
|
|
+ byteData = fmt.Appendf(nil, "[%s] %s %s", IdMsg(config.CONVERT_FAILED), request.conn.channel, request.Cmd)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
@@ -420,7 +420,7 @@ func (h *Hub) requestFromNet(request *RequestData) {
|
|
|
request.conn.sendResponse <- &ResponseData{
|
|
|
Id: request.Id,
|
|
|
State: config.NO_MATCH_CMD,
|
|
|
- Data: fmt.Appendf(nil, "[%s] Channel: %s, Cmd: %s", config.IdMsg(config.NO_MATCH_CMD), channel, cmd),
|
|
|
+ Data: fmt.Appendf(nil, "[%s] Channel: %s, Cmd: %s", IdMsg(config.NO_MATCH_CMD), channel, cmd),
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@@ -494,7 +494,7 @@ func (h *Hub) GetOneWithStruct(gd *GetData) (response *ResponseData) {
|
|
|
if gd.Filter == nil {
|
|
|
return &ResponseData{
|
|
|
State: config.NO_MATCH_FILTER,
|
|
|
- Data: fmt.Appendf(nil, "[%s] not filter function", config.IdMsg(config.NO_MATCH_FILTER)),
|
|
|
+ Data: fmt.Appendf(nil, "[%s] not filter function", IdMsg(config.NO_MATCH_FILTER)),
|
|
|
}
|
|
|
}
|
|
|
gd.Max = 1
|
|
|
@@ -505,7 +505,7 @@ func (h *Hub) GetOneWithStruct(gd *GetData) (response *ResponseData) {
|
|
|
if response == nil {
|
|
|
return &ResponseData{
|
|
|
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),
|
|
|
+ Data: fmt.Appendf(nil, "[%s] Filter: %s, Cmd: %s", IdMsg(config.NO_MATCH_CONNECT), GetFunctionName(gd.Filter), gd.Cmd),
|
|
|
}
|
|
|
}
|
|
|
return
|