}
}
else if (!listener->maxconn || listener->nbconn < listener->maxconn) {
- fd_want_recv(listener->rx.fd);
+ listener->rx.proto->enable(listener);
listener_set_state(listener, LI_READY);
}
else {
}
if (l->maxconn && l->nbconn >= l->maxconn) {
+ l->rx.proto->disable(l);
listener_set_state(l, LI_FULL);
goto done;
}
- fd_want_recv(l->rx.fd);
+ l->rx.proto->enable(l);
listener_set_state(l, LI_READY);
done:
if (l->state >= LI_READY) {
MT_LIST_DEL(&l->wait_queue);
if (l->state != LI_FULL) {
- fd_stop_recv(l->rx.fd);
+ l->rx.proto->disable(l);
listener_set_state(l, LI_FULL);
}
}
HA_SPIN_LOCK(LISTENER_LOCK, &l->lock);
if (l->state == LI_READY) {
MT_LIST_TRY_ADDQ(list, &l->wait_queue);
- fd_stop_recv(l->rx.fd);
+ l->rx.proto->disable(l);
listener_set_state(l, LI_LIMITED);
}
HA_SPIN_UNLOCK(LISTENER_LOCK, &l->lock);
*/
void do_unbind_listener(struct listener *listener, int do_close)
{
- if (listener->state == LI_READY && fd_updt)
- fd_stop_recv(listener->rx.fd);
+ if (listener->state == LI_READY)
+ listener->rx.proto->disable(listener);
MT_LIST_DEL(&listener->wait_queue);
if (listener->state >= LI_PAUSED) {
listener_set_state(listener, LI_ASSIGNED);
- fd_stop_both(listener->rx.fd);
+ listener->rx.proto->rx_disable(&listener->rx);
}
if (do_close && listener->rx.fd != -1) {