RECONNECT fix read from freed iscsi context
This commit is contained in:
@@ -241,7 +241,6 @@ try_again:
|
|||||||
iscsi->tcp_syncnt = old_iscsi->tcp_syncnt;
|
iscsi->tcp_syncnt = old_iscsi->tcp_syncnt;
|
||||||
|
|
||||||
if (iscsi_full_connect_sync(iscsi, iscsi->portal, iscsi->lun) != 0) {
|
if (iscsi_full_connect_sync(iscsi, iscsi->portal, iscsi->lun) != 0) {
|
||||||
iscsi_destroy_context(iscsi);
|
|
||||||
int backoff=retry;
|
int backoff=retry;
|
||||||
if (backoff > 10) {
|
if (backoff > 10) {
|
||||||
backoff+=rand()%10;
|
backoff+=rand()%10;
|
||||||
@@ -251,6 +250,7 @@ try_again:
|
|||||||
backoff=30;
|
backoff=30;
|
||||||
}
|
}
|
||||||
DPRINTF(iscsi,1,"reconnect try %d failed, waiting %d seconds",retry,backoff);
|
DPRINTF(iscsi,1,"reconnect try %d failed, waiting %d seconds",retry,backoff);
|
||||||
|
iscsi_destroy_context(iscsi);
|
||||||
sleep(backoff);
|
sleep(backoff);
|
||||||
retry++;
|
retry++;
|
||||||
goto try_again;
|
goto try_again;
|
||||||
|
|||||||
Reference in New Issue
Block a user