general: optimize codes

This commit is contained in:
nadoo committed 2020-08-10 18:43:41 +08:00
1 parent 3c509f8b7a
commit 8f661a67a4
15 files changed
+35 -37

No files matched your search

+1 -1
View File
@@ -260,7 +260,7 @@ func checkWebSite(fwdr *Forwarder, website string, timeout time.Duration, buf []
rc.SetDeadline(time.Now().Add(timeout))
}
_, err = rc.Write([]byte("GET / HTTP/1.0\r\n\r\n"))
_, err = io.WriteString(rc, "GET / HTTP/1.0\r\n\r\n")
if err != nil {
fwdr.Disable()
log.F("[check] %s(%d) -> %s, DISABLED. error in write: %s", fwdr.Addr(), fwdr.Priority(),