Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: clean up messy code
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed Oct 6, 2011
1 parent 60c639f commit e3bcecd
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/unix/stream.c
Expand Up @@ -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;
}

Expand Down

0 comments on commit e3bcecd

Please sign in to comment.