Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

WebSocket: backend request left open when the client leaves before the upgrade completes

Abierto
#155 0 comentarios 0 reacciones 0 asignados Ver en GitHub

@tsegismont ya está trabajando en esto.

Desde el 20/10/2026.

  • #156 de @zenios — fusionado

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
java

Línea de trabajo

Start with the WebSocket branch of ReverseProxy.Proxy#sendRequest, which calls request.connect() without setting a reset handler, and compare it with ProxiedRequest#sendRequest, which resets the backend request from the client response's exception handler. Then read ReverseProxy.Proxy#sendResponse where the 101 failure branch prints 'Handle this case'. The two tests named in WebSocketTest in PR #156 are the reproducers; the work is done when both pass and the backend socket closes after the client leaves. PR #156 is already open, so check it before starting.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Version

5.2.1 (also current main)

Context

The client and backend sockets of a proxied WebSocket are only joined in ReverseProxy.Proxy#sendResponse once the
backend answers 101. Nothing watches the client connection before that, so a client that goes away during the
upgrade leaves the request to the backend open:

  1. Backend has not answered yet: the backend connection stays open for as long as the backend does not answer
    (indefinitely for a backend that never answers).
  2. Backend answers 101 after the client left: proxiedRequest().toNetSocket() fails, the failure branch prints
    Handle this case and a stack trace to System.err, and the backend socket is never closed.
  3. Client already gone when the origin is resolved (e.g. an OriginRequestProvider doing an async lookup): the
    upgrade is still sent to the backend.

Proxied HTTP requests do not have this problem: ProxiedRequest#sendRequest resets the backend request from the
client response's exception handler. The WebSocket branch in ReverseProxy.Proxy#sendRequest calls
request.connect() directly and does not set it.

Steps to reproduce
  1. Proxy to a backend that reads the upgrade request and never answers.
  2. Send a WebSocket upgrade through the proxy, then close the client connection.
  3. The backend connection is never closed.
Do you have a reproducer?

Yes, two tests in WebSocketTest in the linked PR; both fail on main (the first by timing out, the second with the
upgrade reaching the backend).

Lenguaje dominante
Java
Estrellas
68
Forks
38
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de eclipse-vertx/vertx-http-proxy

Todos los issues de eclipse-vertx/vertx-http-proxy

Issues similares

Más issues de Java

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.