diff options
author | Stef Walter <stef@memberwebs.com> | 2004-10-05 16:38:49 +0000 |
---|---|---|
committer | Stef Walter <stef@memberwebs.com> | 2004-10-05 16:38:49 +0000 |
commit | 08bf44b85193fd70c6a1d1fe195334b88bea1feb (patch) | |
tree | c47d49772649300731f190c979a4c3d0f64af8ff /common/smtppass.c | |
parent | ec0b5feaa141962497873ebf6997904aaacb1812 (diff) |
Don't send server NOOPs if it closed the connection.
Diffstat (limited to 'common/smtppass.c')
-rw-r--r-- | common/smtppass.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/smtppass.c b/common/smtppass.c index 8b71f4d..9e50c55 100644 --- a/common/smtppass.c +++ b/common/smtppass.c @@ -1388,8 +1388,11 @@ static int read_server_response(spctx_t* ctx) static void do_server_noop(spctx_t* ctx) { - if(spio_write_data(ctx, &(ctx->server), SMTP_NOOP) != -1) - spio_read_line(ctx, &(ctx->server), SPIO_DISCARD); + if(spio_valid(&(ctx->server))) + { + if(spio_write_data(ctx, &(ctx->server), SMTP_NOOP) != -1) + spio_read_line(ctx, &(ctx->server), SPIO_DISCARD); + } } void sp_setup_forked(spctx_t* ctx, int file) |