mirror of
https://github.com/soypat/lneto.git
synced 2026-08-18 21:54:01 +00:00
tcp.Conn:add Flush method and more lock protection
This commit is contained in:
@@ -297,11 +297,16 @@ func run() (err error) {
|
||||
timeHTTPSend := timer("send HTTP request")
|
||||
conn.SetDeadline(time.Now().Add(internetTimeout))
|
||||
_, err = conn.Write(req)
|
||||
timeHTTPSend()
|
||||
timeHTTPRcv := timer("recv http request")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = conn.Flush()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
timeHTTPSend()
|
||||
timeHTTPRcv := timer("recv http request")
|
||||
|
||||
rxbuf := make([]byte, 2048)
|
||||
|
||||
var page []byte
|
||||
|
||||
Reference in New Issue
Block a user