mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-03-09 12:49:03 +00:00
Up deadline to reduce cpu load
This commit is contained in:
parent
fb528c47c0
commit
66e309c5c4
1 changed files with 1 additions and 1 deletions
|
|
@ -96,7 +96,7 @@ func ReadMessages(conn net.Conn) (msgs []*Msg, err error) {
|
|||
|
||||
for {
|
||||
// Give buffering some time
|
||||
conn.SetReadDeadline(time.Now().Add(5 * time.Millisecond))
|
||||
conn.SetReadDeadline(time.Now().Add(100 * time.Millisecond))
|
||||
// Create a new temporarily buffer
|
||||
b := make([]byte, 1440)
|
||||
n, _ := conn.Read(b)
|
||||
|
|
|
|||
Loading…
Reference in a new issue