ybzwyrcld/ntrip

When ParseData returns negative, does it need to unregister socket fd from epoll?

Closed this issue · 1 comments

I am reading the following lines.

if (ParseData(epoll_events_[i].data.fd, buffer.get(), ret) < 0) {
  close(epoll_events_[i].data.fd);
}

After close fd, does it need to unregister from epoll as well?

I think it's good. To do it before close().