mirror of
https://github.com/3proxy/3proxy.git
synced 2026-03-30 18:40:10 +08:00
Use quit shutdown for SSL to prevent races
Some checks are pending
C/C++ CI / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (windows-2022) (push) Waiting to run
Some checks are pending
C/C++ CI / ${{ matrix.target }} (macos-15) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (ubuntu-24.04-arm) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (ubuntu-latest) (push) Waiting to run
C/C++ CI / ${{ matrix.target }} (windows-2022) (push) Waiting to run
This commit is contained in:
parent
a2edecfbad
commit
6143dfcb18
@ -109,13 +109,15 @@ static void addSSL(
|
||||
|
||||
void delSSL(void *state, SOCKET s){
|
||||
if(!state || s == INVALID_SOCKET) return;
|
||||
if(STATE->cli.s == s) {
|
||||
if(STATE->cli.s == s && STATE->cli.conn) {
|
||||
SSL_set_quiet_shutdown(STATE->cli.conn, 1);
|
||||
SSL_shutdown(STATE->cli.conn);
|
||||
ssl_conn_free(STATE->cli.conn);
|
||||
STATE->cli.conn = NULL;
|
||||
STATE->cli.s = INVALID_SOCKET;
|
||||
}
|
||||
else if(STATE->srv.s == s) {
|
||||
else if(STATE->srv.s == s && STATE->srv.conn) {
|
||||
SSL_set_quiet_shutdown(STATE->srv.conn, 1);
|
||||
SSL_shutdown(STATE->srv.conn);
|
||||
ssl_conn_free(STATE->srv.conn);
|
||||
STATE->srv.conn = NULL;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user