When the SSEServer instance was created using the NewSSEServer method, the http.server instance was passed in using the WithHTTPServer method, but when the sseserver.start method is executed, the http.server instance is reset
for instance:
sseServer := server.NewSSEServer(s, server.WithHTTPServer(&router))
if err := sseServer.Start(":8080"); err != nil {
fmt.Printf("Server error: %v\n", err)
}
but the srv is reset when execute Start function:
func (s *SSEServer) Start(addr string) error {
s.srv = &http.Server{
Addr: addr,
Handler: s,
}
return s.srv.ListenAndServe()
}