return NULL;
}
+ /*
+ * So that read / write pause / resume callbacks can find us
+ */
+ my->fd->uctx = my;
+
my->fd_info = fr_bio_fd_info(my->fd);
fr_assert(my->fd_info != NULL);
*/
if (fr_bio_retry_entry_cancel(my->retry, NULL) < 1) {
all_ids_used:
+ my->all_ids_used = true;
+
+ if (my->common.write_blocked) my->common.write_blocked(&my->common);
+
fr_strerror_const("All IDs are in use");
return fr_bio_error(GENERIC);
}
*/
id_ctx->request_ctx = NULL;
id_ctx->retry_ctx = NULL;
+
+ /*
+ * IO was blocked due to IDs. We now have a free ID, so perhaps we can resume writes. But only
+ * if the IO handlers didn't mark us as "write blocked".
+ */
+ if (my->all_ids_used) {
+ my->all_ids_used = false;
+
+ if (!my->write_blocked && my->common.write_resume) my->common.write_resume(&my->common);
+ }
}
/** Cancel one packet.