Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

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

Đang mở
#155 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

@zenios đang làm issue này rồi.

Từ ngày 10/10/2026.

  • #156 của @zenios — đang mở

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
backend, networking

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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).

Ngôn ngữ chính
Java
Star
68
Fork
38
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của eclipse-vertx/vertx-http-proxy

Tất cả issue của eclipse-vertx/vertx-http-proxy

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.