|
@@ -238,7 +238,7 @@ func (h *Hub) sendRequest(gd *GetData) (count int) {
|
|
|
go h.outResponse(&ResponseData{
|
|
|
Id: id,
|
|
|
State: config.GET_TIMEOUT,
|
|
|
- Data: []byte(config.GET_TIMEOUT_MSG),
|
|
|
+ Data: []byte(fmt.Sprintf("[%s] %s %s", config.GET_TIMEOUT_MSG, gd.Channel.String(), gd.Cmd)),
|
|
|
conn: conn,
|
|
|
})
|
|
|
// 检查是否已经很久时间没有使用连接了
|
|
@@ -338,7 +338,7 @@ func (h *Hub) requestFromNet(request *RequestData) {
|
|
|
request.conn.sendResponse <- &ResponseData{
|
|
|
Id: request.Id,
|
|
|
State: config.NO_MATCH,
|
|
|
- Data: []byte(config.NO_MATCH_MSG),
|
|
|
+ Data: fmt.Appendf(nil, "[%s] %s %s", config.NO_MATCH_MSG, channel, cmd),
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -420,7 +420,7 @@ func (h *Hub) GetOne(channel *regexp.Regexp, cmd string, data []byte) (response
|
|
|
if response == nil {
|
|
|
response = &ResponseData{
|
|
|
State: config.CONNECT_NO_MATCH,
|
|
|
- Data: []byte(config.CONNECT_NO_MATCH_MSG),
|
|
|
+ Data: fmt.Appendf(nil, "[%s] %s %s", config.CONNECT_NO_MATCH_MSG, channel.String(), cmd),
|
|
|
}
|
|
|
}
|
|
|
return
|
|
@@ -436,7 +436,7 @@ func (h *Hub) GetOneWithTimeout(channel *regexp.Regexp, cmd string, data []byte,
|
|
|
if response == nil {
|
|
|
response = &ResponseData{
|
|
|
State: config.CONNECT_NO_MATCH,
|
|
|
- Data: []byte(config.CONNECT_NO_MATCH_MSG),
|
|
|
+ Data: fmt.Appendf(nil, "[%s] %s %s", config.CONNECT_NO_MATCH_MSG, channel.String(), cmd),
|
|
|
}
|
|
|
}
|
|
|
return
|