@@ -933,7 +933,6 @@ net_connect2(struct sockaddr *sa, socklen_t salen, int *sd) | |||||
return errno; | return errno; | ||||
} | } | ||||
btpd.npeers++; | |||||
return 0; | return 0; | ||||
} | } | ||||
@@ -983,7 +982,6 @@ net_connection_cb(int sd, short type, void *arg) | |||||
return; | return; | ||||
} | } | ||||
btpd.npeers++; | |||||
peer_create_in(nsd); | peer_create_in(nsd); | ||||
btpd_log(BTPD_L_CONN, "got connection.\n"); | btpd_log(BTPD_L_CONN, "got connection.\n"); | ||||
@@ -151,6 +151,7 @@ peer_create_common(int sd) | |||||
event_set(&p->in_ev, p->sd, EV_READ, net_read_cb, p); | event_set(&p->in_ev, p->sd, EV_READ, net_read_cb, p); | ||||
event_add(&p->in_ev, NULL); | event_add(&p->in_ev, NULL); | ||||
btpd.npeers++; | |||||
return p; | return p; | ||||
} | } | ||||