Remove tunnel_close acknowledgment to prevent SSL write failures

- Remove send_tunnel_close from handle_tunnel_close to avoid SSL errors
- When server sends tunnel_close, client just closes tunnel locally
- Prevents SSL connection corruption when trying to send on closed connection
parent 9aa71110
...@@ -793,7 +793,7 @@ void send_tunnel_close(SSL *ssl, const char *request_id, int debug) { ...@@ -793,7 +793,7 @@ void send_tunnel_close(SSL *ssl, const char *request_id, int debug) {
} }
} }
void handle_tunnel_close(SSL *ssl, const char *request_id, int debug) { void handle_tunnel_close(SSL *ssl __attribute__((unused)), const char *request_id, int debug) {
pthread_mutex_lock(&tunnel_mutex); pthread_mutex_lock(&tunnel_mutex);
tunnel_t *tunnel = find_tunnel_by_request_id(request_id); tunnel_t *tunnel = find_tunnel_by_request_id(request_id);
if (tunnel) { if (tunnel) {
...@@ -803,8 +803,6 @@ void handle_tunnel_close(SSL *ssl, const char *request_id, int debug) { ...@@ -803,8 +803,6 @@ void handle_tunnel_close(SSL *ssl, const char *request_id, int debug) {
printf("[DEBUG - Tunnel] Tunnel %s closed\n", request_id); printf("[DEBUG - Tunnel] Tunnel %s closed\n", request_id);
fflush(stdout); fflush(stdout);
} }
// Send tunnel_close back to server to acknowledge
send_tunnel_close(ssl, request_id, debug);
} }
pthread_mutex_unlock(&tunnel_mutex); pthread_mutex_unlock(&tunnel_mutex);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment