| 392 | | if (bEpoll) { // well, this will always be true. Otherwise we wouldn't be here. |
|---|
| 393 | | assert (epfd != -1); |
|---|
| 394 | | int e = epoll_ctl (epfd, EPOLL_CTL_DEL, ed->GetSocket(), ed->GetEpollEvent()); |
|---|
| 395 | | // ENOENT is not an error because the socket may be already closed when we get here. |
|---|
| 396 | | if (e && (e != ENOENT)) { |
|---|
| 397 | | char buf [200]; |
|---|
| 398 | | snprintf (buf, sizeof(buf)-1, "unable to delete epoll event: %s", strerror(errno)); |
|---|
| 399 | | throw std::runtime_error (buf); |
|---|
| 400 | | } |
|---|
| | 392 | assert (bEpoll); // wouldn't be in this method otherwise. |
|---|
| | 393 | assert (epfd != -1); |
|---|
| | 394 | int e = epoll_ctl (epfd, EPOLL_CTL_DEL, ed->GetSocket(), ed->GetEpollEvent()); |
|---|
| | 395 | // ENOENT is not an error because the socket may be already closed when we get here. |
|---|
| | 396 | if (e && (e != ENOENT)) { |
|---|
| | 397 | char buf [200]; |
|---|
| | 398 | snprintf (buf, sizeof(buf)-1, "unable to delete epoll event: %s", strerror(errno)); |
|---|
| | 399 | throw std::runtime_error (buf); |
|---|