Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 831b856f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Skip service of poll sockets that are no longer registered"

parents c8130dee 8e4c257b
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -448,6 +448,10 @@ static void process_data_sock(int h, struct pollfd* pfds, int count) {
  for (i = 1; i < ts[h].poll_count; i++) {
    if (pfds[i].revents) {
      int ps_i = ts[h].psi[i];
      if (ts[h].ps[ps_i].pfd.fd == -1) {
        LOG_INFO("Socket has been removed from poll set");
        continue;
      }
      asrt(pfds[i].fd == ts[h].ps[ps_i].pfd.fd);
      uint32_t user_id = ts[h].ps[ps_i].user_id;
      int type = ts[h].ps[ps_i].type;