Increased timeout to 500ms
This commit is contained in:
parent
639f1fd339
commit
bea468f1e5
|
@ -279,7 +279,7 @@ func ReadMessages(conn net.Conn) (msgs []*Msg, err error) {
|
||||||
var totalBytes int
|
var totalBytes int
|
||||||
for {
|
for {
|
||||||
// Give buffering some time
|
// Give buffering some time
|
||||||
conn.SetReadDeadline(time.Now().Add(200 * time.Millisecond))
|
conn.SetReadDeadline(time.Now().Add(500 * time.Millisecond))
|
||||||
// Create a new temporarily buffer
|
// Create a new temporarily buffer
|
||||||
b := make([]byte, 1440)
|
b := make([]byte, 1440)
|
||||||
// Wait for a message from this peer
|
// Wait for a message from this peer
|
||||||
|
|
Loading…
Reference in New Issue