Преглед на файлове

Remove the events for a peer's socket before closing it. At least the epoll

libevent backend didn't like the fd to be closed. Reported by Ludvig Omholt.
master
Richard Nyberg преди 18 години
родител
ревизия
7ce1098dff
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. +1
    -1
      btpd/peer.c

+ 1
- 1
btpd/peer.c Целия файл

@@ -30,9 +30,9 @@ peer_kill(struct peer *p)
if (p->flags & PF_ON_WRITEQ)
BTPDQ_REMOVE(&net_bw_writeq, p, wq_entry);

close(p->sd);
btpd_ev_del(&p->in_ev);
btpd_ev_del(&p->out_ev);
close(p->sd);

nl = BTPDQ_FIRST(&p->outq);
while (nl != NULL) {


Loading…
Отказ
Запис