From f3a3854718aee9d15a599cc986d39cbf4a7ffc28 Mon Sep 17 00:00:00 2001 From: Ronnie Sahlberg Date: Wed, 15 Apr 2015 08:25:16 -0700 Subject: [PATCH] iscsi.h: document when iscsi_which_events return 0 Signed-off-by: Ronnie Sahlberg --- include/iscsi.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/iscsi.h b/include/iscsi.h index 664c741..a36f5aa 100644 --- a/include/iscsi.h +++ b/include/iscsi.h @@ -61,6 +61,14 @@ struct sockaddr; EXTERN int iscsi_get_fd(struct iscsi_context *iscsi); /* * Returns which events that we need to poll for for the iscsi file descriptor. + * + * This function can return 0 which means that there are no events to + * poll for at this time. In that case the application should wait some time + * before calling iscsi_which_events() again. This could for example happen + * if we fail to reconnect the TCP session during an automatic session + * reconnect. + * When this function returns 0, the application should wait >=100ms + * before trying again. */ EXTERN int iscsi_which_events(struct iscsi_context *iscsi); /*