unix: fix busy loop on unexpected tcp message
Don't start reading immediately after connecting. If the server sends a message and the client hasn't called uv_read_start() yet, the event loop will busy loop because the pending message keeps waking it up.
This commit is contained in:
parent
1d1dd9bb7d
commit
3b8c0da5a5
@ -784,9 +784,6 @@ static void uv__stream_connect(uv_stream_t* stream) {
|
||||
if (error == EINPROGRESS)
|
||||
return;
|
||||
|
||||
if (error == 0)
|
||||
uv__io_start(stream->loop, &stream->read_watcher);
|
||||
|
||||
stream->connect_req = NULL;
|
||||
uv__req_unregister(stream->loop, req);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user