diff options
author | Lee Duncan <lduncan@suse.com> | 2019-05-14 14:12:25 -0700 |
---|---|---|
committer | Lee Duncan <lduncan@suse.com> | 2019-05-14 14:12:25 -0700 |
commit | 4ee991b81194a7e3ebd7ff6ec4efc5509932389d (patch) | |
tree | eb5466cec53535c0b20cd7c1ac5db50102e71684 | |
parent | 0cf0a05ae0ff67d9b68a69b68df89f42258c3c53 (diff) | |
download | open-iscsi-4ee991b81194a7e3ebd7ff6ec4efc5509932389d.tar.gz |
Fix possible discovery hang when timing out
If session reopening failed during discovery, the CPU
could peg at 100% because the code that gives up when
tretires are exhausted was not setting an error
return value.
-rw-r--r-- | usr/discovery.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/usr/discovery.c b/usr/discovery.c index 2147deb..199c160 100644 --- a/usr/discovery.c +++ b/usr/discovery.c @@ -1355,6 +1355,7 @@ reconnect: if (--session->reopen_cnt < 0) { log_error("connection login retries (reopen_max) %d exceeded", config->reopen_max); + rc = ISCSI_ERR_PDU_TIMEOUT; goto login_failed; } |