Browse Source

[Minor] Add potential workaround for the race condition

tags/3.2
Vsevolod Stakhov 2 years ago
parent
commit
48779e829f
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      src/libserver/ssl_util.c

+ 7
- 0
src/libserver/ssl_util.c View File

@@ -434,6 +434,13 @@ rspamd_ssl_connection_dtor (struct rspamd_ssl_connection *conn)
g_free (conn->hostname);
}

/*
* Try to workaround for the race between timeout and ssl error
*/
if (conn->shut_ev != conn->ev && ev_can_stop (&conn->ev->tm)) {
rspamd_ev_watcher_stop (conn->event_loop, conn->ev);
}

if (conn->shut_ev) {
rspamd_ev_watcher_stop (conn->event_loop, conn->shut_ev);
g_free (conn->shut_ev);

Loading…
Cancel
Save