This was currently the only way how data != NULL here.
This change destroys ssl_proxy on client_destroy() instead of
client_unref(), but that doesn't make much of a practical difference. This
new behavior is a bit more correct though.
if (data == NULL)
client_destroy_internal_failure(client);
- else
- client_destroy_success(client, data);
+ else {
+ /* e.g. mail_max_userip_connections is reached */
+ client->no_extra_disconnect_reason = TRUE;
+ client_destroy(client, data);
+ }
break;
case SASL_SERVER_REPLY_CONTINUE:
i_assert(client->v.auth_send_challenge != NULL);
pool_unref(&client->preproxy_pool);
- if (!client->login_success && reason != NULL) {
+ if (!client->login_success &&
+ !client->no_extra_disconnect_reason && reason != NULL) {
const char *extra_reason =
client_get_extra_disconnect_reason(client);
if (extra_reason[0] != '\0')
bool destroyed:1;
bool input_blocked:1;
bool login_success:1;
+ bool no_extra_disconnect_reason:1;
bool starttls:1;
bool tls:1;
bool secured:1;