Skip to content

Option to break the epoll main loop #56

Open

Description

@david20160

Hello,

In order to exit from the server cleaning the way, may be doing this change in the line 1700:

while (1) {

change to

int nev = 0;
while (1) {
    if (nev != -1) break;
    [delete int from the next line]

To quit the loop only it is needed:

int res = epoll_ctl (server->loop, EPOLL_CTL_DEL, 1, NULL);
close (server->loop);

It can be more stylished but works.

Activity

  1. Yasha-ops commented on Dec 3, 2023

    @Yasha-ops

    How do you handle memory leaks after the close ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions