1
This commit is contained in:
@@ -48,8 +48,12 @@ func Run(w http.ResponseWriter, r *http.Request) {
|
||||
//设置读取消息大小上线
|
||||
conn.SetReadLimit(maxMessageSize)
|
||||
|
||||
//clientID := r.FormValue("clientId")
|
||||
clientID := r.Header.Get("Clientid")
|
||||
clientID := ""
|
||||
if temp := r.Header.Get("Clientid"); len(temp) == 0 {
|
||||
clientID = RandString()
|
||||
} else {
|
||||
clientID = temp
|
||||
}
|
||||
globals.SugarLogger.Debugf("Run clientID=%s", clientID)
|
||||
clientSocket := NewClient(clientID, conn)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user