From b9e0f21352f135d7f13ec5b17d990a31c09cccc3 Mon Sep 17 00:00:00 2001 From: shadowy-pycoder <35629483+shadowy-pycoder@users.noreply.github.com> Date: Tue, 22 Jul 2025 11:56:55 +0300 Subject: [PATCH] fixed SSE connections, bumped to v1.9.2 --- README.md | 2 +- gohpts.go | 2 +- version.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6737a95..4a6557f 100644 --- a/README.md +++ b/README.md @@ -101,7 +101,7 @@ You can download the binary for your platform from [Releases](https://github.com Example: ```shell -HPTS_RELEASE=v1.9.1; wget -v https://github.com/shadowy-pycoder/go-http-proxy-to-socks/releases/download/$HPTS_RELEASE/gohpts-$HPTS_RELEASE-linux-amd64.tar.gz -O gohpts && tar xvzf gohpts && mv -f gohpts-$HPTS_RELEASE-linux-amd64 gohpts && ./gohpts -h +HPTS_RELEASE=v1.9.2; wget -v https://github.com/shadowy-pycoder/go-http-proxy-to-socks/releases/download/$HPTS_RELEASE/gohpts-$HPTS_RELEASE-linux-amd64.tar.gz -O gohpts && tar xvzf gohpts && mv -f gohpts-$HPTS_RELEASE-linux-amd64 gohpts && ./gohpts -h ``` Alternatively, you can install it using `go install` command (requires Go [1.24](https://go.dev/doc/install) or later): diff --git a/gohpts.go b/gohpts.go index 4dc6d6d..b68186a 100644 --- a/gohpts.go +++ b/gohpts.go @@ -1146,7 +1146,7 @@ readLoop: } if er != nil { if ne, ok := er.(net.Error); ok && ne.Timeout() { - break readLoop + continue // support long-lived connections (SSE, WebSockets, etc) } if errors.Is(er, net.ErrClosed) { break readLoop diff --git a/version.go b/version.go index 1d0f968..0366c84 100644 --- a/version.go +++ b/version.go @@ -1,3 +1,3 @@ package gohpts -const Version string = "gohpts v1.9.1" +const Version string = "gohpts v1.9.2"