* let it read from the socket.
*/
if (accept_fd >= 0) {
- if (!fr_io_connection_alloc(inst, thread, client, accept_fd, &address, NULL)) {
+ connection = fr_io_connection_alloc(inst, thread, client, accept_fd, &address, NULL);
+ if (!connection) {
static fr_rate_limit_t alloc_failed;
RATE_LIMIT_LOCAL(thread ? &thread->rate_limit.conn_alloc_failed : &alloc_failed,
ERROR, "Failed to allocate connection from client %s", client->radclient->shortname);
+ return -1;
+ }
+
+ /*
+ * The parent is in use - ensure the cleanup timer is disarmed.
+ */
+ if (fr_timer_armed(connection->parent->ev)) {
+ FR_TIMER_DISARM_RETURN(connection->parent->ev);
+ connection->parent->ready_to_delete = false;
}
return 0;