RECONNECT avoid deadlock on reconnect retry timeout
If there is a clock jump e.g. due to daylight saving time the wait can be almost infinite
This commit is contained in:
committed by
Ronnie Sahlberg
parent
328755fb68
commit
a75727d989
@@ -222,7 +222,7 @@ int iscsi_reconnect(struct iscsi_context *old_iscsi)
|
|||||||
int retry = 0;
|
int retry = 0;
|
||||||
|
|
||||||
if (old_iscsi->last_reconnect) {
|
if (old_iscsi->last_reconnect) {
|
||||||
while (time(NULL) - old_iscsi->last_reconnect < 5) sleep(1);
|
if (time(NULL) - old_iscsi->last_reconnect < 5) sleep(5);
|
||||||
}
|
}
|
||||||
|
|
||||||
try_again:
|
try_again:
|
||||||
|
|||||||
Reference in New Issue
Block a user