Commit 7d09c92c29e2e81a06b1d4bf84df302cb3ffe27f
1 parent
4631063d
Exists in
master
and in
3 other branches
Fixing "wait_for_ready" behavior during the "connecting..." state.
Showing
1 changed file
with
3 additions
and
2 deletions
Show diff stats
src/core/wait.c
... | ... | @@ -43,7 +43,8 @@ LIB3270_EXPORT int lib3270_wait_for_ready(H3270 *hSession, int seconds) |
43 | 43 | { |
44 | 44 | time_t end = time(0)+seconds; |
45 | 45 | |
46 | - FAIL_IF_NOT_ONLINE(hSession); | |
46 | + if(lib3270_is_disconnected(hSession)) | |
47 | + return errno = ENOTCONN; | |
47 | 48 | |
48 | 49 | lib3270_main_iterate(hSession,0); |
49 | 50 | |
... | ... | @@ -56,7 +57,7 @@ LIB3270_EXPORT int lib3270_wait_for_ready(H3270 *hSession, int seconds) |
56 | 57 | if(!lib3270_get_lock_status(hSession)) |
57 | 58 | return 0; |
58 | 59 | |
59 | - if(!lib3270_is_connected(hSession)) | |
60 | + if(lib3270_is_disconnected(hSession)) | |
60 | 61 | return errno = ENOTCONN; |
61 | 62 | |
62 | 63 | lib3270_main_iterate(hSession,1); | ... | ... |