mirror of
https://github.com/nadoo/glider.git
synced 2025-02-23 09:25:41 +08:00
common: remove unnecessary logs
This commit is contained in:
parent
9acaff5b4a
commit
73a778f5e1
@ -5,8 +5,6 @@ import (
|
||||
"io"
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"github.com/nadoo/glider/common/log"
|
||||
)
|
||||
|
||||
// UDPBufSize is the size of udp buffer
|
||||
@ -85,7 +83,6 @@ func TimedCopy(dst net.PacketConn, target net.Addr, src net.PacketConn, timeout
|
||||
func OutboundIP() string {
|
||||
conn, err := net.Dial("udp", "8.8.8.8:80")
|
||||
if err != nil {
|
||||
log.F("get outbound ip error: %s", err)
|
||||
return ""
|
||||
}
|
||||
defer conn.Close()
|
||||
|
@ -90,7 +90,7 @@ func (c *Client) Exchange(reqBytes []byte, clientAddr string, preferTCP bool) ([
|
||||
}
|
||||
}
|
||||
|
||||
// add to cache
|
||||
// add to cache only when there's a valid ip address
|
||||
if len(ips) != 0 {
|
||||
c.cache.Put(getKey(resp.Question), respBytes, ttl)
|
||||
}
|
||||
|
@ -195,7 +195,7 @@ func (s *HTTP) servHTTPS(method, requestURI, proto string, c net.Conn) {
|
||||
return
|
||||
}
|
||||
|
||||
c.Write([]byte("HTTP/1.0 200 Connection established\r\n\r\n"))
|
||||
c.Write([]byte("HTTP/1.1 200 Connection established\r\n\r\n"))
|
||||
|
||||
log.F("[http] %s <-> %s [c]", c.RemoteAddr(), requestURI)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user