Skip to content

fix: add heartbeats to close dead connections, also improve live reload script - #57

Merged
veeso merged 1 commit into
veeso:mainfrom
schonfinkel:fix/live-reload-script
Jun 7, 2026
Merged

fix: add heartbeats to close dead connections, also improve live reload script#57
veeso merged 1 commit into
veeso:mainfrom
schonfinkel:fix/live-reload-script

Conversation

@schonfinkel

@schonfinkel schonfinkel commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

Description

This is my attempt to solve an issue I originally reported at #53, I decided to also add a heartbeat to the dev web server and that seems to properly handle the dead connections now. Here's an example below:

blogatto_fix
  • I'm running watch -n 1 ss -tn 'sport = :3000' in the first terminal.
  • The fix works in both chrome-based browsers and firefox (at least as far as I could test).

I added comments in certain parts of the fix, as I changed the signatures of sse_init and sse_loop, I can go back and use the Result-based approach, but it really didn't make any sense that this type should be a Result, since this is an internal module no users are impacted.

@cocogitto-bot

cocogitto-bot Bot commented Jun 6, 2026

Copy link
Copy Markdown

✔️ cf01411 - Conventional commits check succeeded.

Comment thread src/blogatto/internal/dev/web_server.gleam
@veeso

veeso commented Jun 7, 2026

Copy link
Copy Markdown
Owner

I'll give it a look today. I'm sorry for the late response; for some reason, I wasn't subscribed to this repo, so I didn't receive any notifications.

@veeso
veeso merged commit f3934b7 into veeso:main Jun 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: dev server hangs after a few in-browser navigations on two Chrome-based browsers

2 participants