Skip to content

Advertiser, APIkeys, QOL and improvements#136

Merged
JacksonTheMaster merged 40 commits into
mainfrom
nightly
Oct 28, 2025
Merged

Advertiser, APIkeys, QOL and improvements#136
JacksonTheMaster merged 40 commits into
mainfrom
nightly

Conversation

@JacksonTheMaster

Copy link
Copy Markdown
Member

No description provided.

mitoskalandiel and others added 30 commits September 29, 2025 16:29
….go so we don't slip on those zips

apparently zips are a slippery slope, ok I'll stop now 🤣
fix: ensure run_bepinex.sh is removed only on Linux if it exists
This is attempt 2 to fix path traversal issues within steamcmd-helper…

working still as expected
…individually getting the state, reducing load on the backend.
Co-authored-by: JLangisch <jakob.langisch@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…nd adjust JWT generation accordingly. Defaults to 1 month if user sends a GET instead.
The race condition between writing to the Http2 Response Writer occurs
when SSE connection is closed, but the Fprintf formatting code is still
executing.
```
panic: Write called after Handler finished

goroutine 9953 [running]:
net/http.(*http2responseWriter).write(0x2?, 0xc0000944e0?, {0xc000096500?, 0x7ff6153450be?, 0x7ff615d95060?}, {0x0?, 0xc000500808?})
        /usr/local/go/src/net/http/h2_bundle.go:6987 +0x13f
net/http.(*http2responseWriter).Write(0xc0000944e0?, {0xc000096500?, 0xa?, 0xc000391f50?})
        /usr/local/go/src/net/http/h2_bundle.go:6976 +0x2a
fmt.Fprintf({0x2426bb5a1a0, 0xc0001982d0}, {0x7ff61584992c, 0xa}, {0xc000391f50, 0x1, 0x1})
        /usr/local/go/src/fmt/print.go:225 +0x97
github.com/JacksonTheMaster/StationeersServerUI/v5/src/core/ssestream.(*SSEManager).streamMessages(0x0?, {0x7ff6159deac0, 0xc0001982d0}, {0x2426b765b58, 0xc0001982d0}, 0xc0001708a0, {0x0?, 0x0?}, 0xc0002f0150)
        src/core/ssestream/ssemanager.go:113 +0x1b6
created by github.com/JacksonTheMaster/StationeersServerUI/v5/src/web.GetLogOutput.StartConsoleStream.(*SSEManager).CreateStreamHandler.func1 in goroutine 9952
        src/core/ssestream/ssemanager.go:93 +0x409
```

This is due to concurrent closing of the underlaying Http2 Response Writer and Formatting message

Reproducer via artificial delay:
```
    for {
        select {
        case msg := <-client.messages:
            time.Sleep(300 * time.Millisecond)
            _, err := fmt.Fprintf(w, "data: %s\n\n", msg)
            if err != nil {
                logger.SSE.Error(" ❌ Failed to send message: " + err.Error())
                return
            }
            flusher.Flush()

        case <-notify:
            return
        }
    }
```
Fix race condition in SSE handling
…d hardcode in config package for improved maintainability

Co-authored-by: mitoskalandiel <mitoskalandiel@gmail.com>
Co-authored-by: mitoskalandiel <mitoskalandiel@gmail.com>

@JacksonTheMaster JacksonTheMaster left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed, looks good to me.

@JacksonTheMaster JacksonTheMaster requested review from akirilov and removed request for akirilov October 28, 2025 21:18
@JacksonTheMaster JacksonTheMaster self-assigned this Oct 28, 2025
@JacksonTheMaster JacksonTheMaster added enhancement New feature or request StationeersServerUI go Pull requests that update go code labels Oct 28, 2025
@JacksonTheMaster JacksonTheMaster merged commit aad7931 into main Oct 28, 2025
9 checks passed
@JacksonTheMaster JacksonTheMaster deleted the nightly branch October 28, 2025 21:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request go Pull requests that update go code StationeersServerUI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants