good morning!!!!

Skip to content
Snippets Groups Projects
Commit 66e309c5 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Up deadline to reduce cpu load

parent fb528c47
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment