Skip to content

Commit

Permalink
lib-smtp: client: transaction: Fix adding a recipient while the trans…
Browse files Browse the repository at this point in the history
…action is already failed.

This did not always trigger an immediate callback.
  • Loading branch information
stephanbosch committed Nov 28, 2017
1 parent ecfca41 commit 1fc55bf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib-smtp/smtp-client-transaction.c
Expand Up @@ -629,7 +629,8 @@ void smtp_client_transaction_add_rcpt(
rcpt->context = context;

if (trans->to_send == NULL &&
trans->state > SMTP_CLIENT_TRANSACTION_STATE_PENDING) {
(trans->state > SMTP_CLIENT_TRANSACTION_STATE_PENDING ||
trans->failure != NULL)) {
trans->to_send = timeout_add_short(0,
smtp_client_transaction_send_rcpts, trans);
}
Expand Down

0 comments on commit 1fc55bf

Please sign in to comment.