eventsource icon indicating copy to clipboard operation
eventsource copied to clipboard

Server Side Events client and server for Go

Results 10 eventsource issues
Sort by recently updated
recently updated
newest added

Let's see the example below: **Server side:** ```golang package main import ( "fmt" "net" "net/http" "time" "github.com/donovanhide/eventsource" ) type TimeEvent time.Time func (t TimeEvent) Id() string { return fmt.Sprint(time.Time(t).UnixNano()) }...

I was getting some test failures under the race detector after calling `stream.Close`. The goroutine that processes events was writing to the channel that `Close` closed. It looks like the...

Unfortunately, CloseNotify() is deprecated: "Deprecated: the CloseNotifier interface predates Go's context package. New code should use Request.Context instead." (https://golang.org/pkg/net/http/#CloseNotifier)

Currently the duration keeps increasing, and after a while of server downtime the client will be unusable since it'll take ages for it to retry. Both the initial and maximum...

Currently, there are several issues with the library. 1. `Close` is not thread safe. the `isStreamClosed` cannot protect a gorouting sending to a panic panel. ref: #33 2. Socket leaks....

I ran into this issue a few times this morning. I was getting panics on writes to closed channels because the initial closed check passed in the loop but once...

Here are a few fixes to satisfy go vet and test. I'm running these on circleci. We use them regularly and it might be worth enabling them for this repo...