mirror of
https://github.com/fhmq/hmq.git
synced 2026-05-02 14:28:34 +00:00
update
This commit is contained in:
@@ -109,6 +109,8 @@ func (c *client) readLoop() {
|
|||||||
//add read timeout
|
//add read timeout
|
||||||
if err := nc.SetReadDeadline(time.Now().Add(timeOut)); err != nil {
|
if err := nc.SetReadDeadline(time.Now().Add(timeOut)); err != nil {
|
||||||
log.Error("set read timeout error: ", zap.Error(err), zap.String("ClientID", c.info.clientID))
|
log.Error("set read timeout error: ", zap.Error(err), zap.String("ClientID", c.info.clientID))
|
||||||
|
msg := &Message{client: c, packet: DisconnectdPacket}
|
||||||
|
b.SubmitWork(c.info.clientID, msg)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package authhttp
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/url"
|
"net/url"
|
||||||
@@ -43,6 +44,7 @@ func Init() {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal("Unmarshal config file error: ", zap.Error(err))
|
log.Fatal("Unmarshal config file error: ", zap.Error(err))
|
||||||
}
|
}
|
||||||
|
fmt.Println("http: config: ", config)
|
||||||
|
|
||||||
httpClient = &http.Client{
|
httpClient = &http.Client{
|
||||||
Transport: &http.Transport{
|
Transport: &http.Transport{
|
||||||
|
|||||||
Reference in New Issue
Block a user