Skip to content

Instantly share code, notes, and snippets.

View alexzh7's full-sized avatar

Alex Zhuravlev alexzh7

View GitHub Profile
@alexzh7
alexzh7 / sse.go
Created November 5, 2019 00:57 — forked from schmohlio/sse.go
Example SSE server in Golang
// v2 of the great example of SSE in go by @ismasan.
// includes fixes:
// * infinite loop ending in panic
// * closing a client twice
// * potentially blocked listen() from closing a connection during multiplex step.
package main
import (
"fmt"
"log"