unix: clean up messy code
This commit is contained in:
parent
60c639fd57
commit
e3bcecdc42
@ -907,14 +907,11 @@ int uv_read2_start(uv_stream_t* stream, uv_alloc_cb alloc_cb,
|
||||
|
||||
|
||||
int uv_read_stop(uv_stream_t* stream) {
|
||||
uv_tcp_t* tcp = (uv_tcp_t*)stream;
|
||||
|
||||
((uv_handle_t*)tcp)->flags &= ~UV_READING;
|
||||
|
||||
ev_io_stop(tcp->loop->ev, &tcp->read_watcher);
|
||||
tcp->read_cb = NULL;
|
||||
tcp->read2_cb = NULL;
|
||||
tcp->alloc_cb = NULL;
|
||||
ev_io_stop(stream->loop->ev, &stream->read_watcher);
|
||||
stream->flags &= ~UV_READING;
|
||||
stream->read_cb = NULL;
|
||||
stream->read2_cb = NULL;
|
||||
stream->alloc_cb = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user