diff options
Diffstat (limited to 'vchat-client.c')
-rwxr-xr-x | vchat-client.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vchat-client.c b/vchat-client.c index dc06015..f521432 100755 --- a/vchat-client.c +++ b/vchat-client.c | |||
@@ -40,6 +40,8 @@ unsigned int loggedin = 0; | |||
40 | int status = 1; | 40 | int status = 1; |
41 | /* we set this, we WANT to quit */ | 41 | /* we set this, we WANT to quit */ |
42 | int ownquit = 0; | 42 | int ownquit = 0; |
43 | /* we set this, we DONT want to quit */ | ||
44 | int wantreconnect = 0; | ||
43 | 45 | ||
44 | /* error string to show after exit */ | 46 | /* error string to show after exit */ |
45 | char errstr[ERRSTRSIZE] = "\0"; | 47 | char errstr[ERRSTRSIZE] = "\0"; |
@@ -549,8 +551,10 @@ main (int argc, char **argv) | |||
549 | /* sanely close connection to server */ | 551 | /* sanely close connection to server */ |
550 | vcdisconnect (); | 552 | vcdisconnect (); |
551 | 553 | ||
552 | if( !ownquit && getintoption( CF_AUTORECONN ) ) | 554 | if( !ownquit && ( getintoption( CF_AUTORECONN ) || wantreconnect ) ) |
553 | status = 1; | 555 | status = 1; |
556 | |||
557 | wantreconnect = 0; | ||
554 | } | 558 | } |
555 | 559 | ||
556 | /* call cleanup-hook without signal */ | 560 | /* call cleanup-hook without signal */ |