Err returns any error that occurred during writing
()
| 307 | |
| 308 | // Err returns any error that occurred during writing |
| 309 | func (h *SSEHandlerCh) Err() error { |
| 310 | h.lock.Lock() |
| 311 | defer h.lock.Unlock() |
| 312 | if h.err == nil && h.ctx.Err() != nil { |
| 313 | h.err = h.ctx.Err() |
| 314 | } |
| 315 | return h.err |
| 316 | } |
| 317 | |
| 318 | // RegisterOnClose registers a handler function to be called when the connection closes |
| 319 | // Returns an ID that can be used to unregister the handler |
no outgoing calls
no test coverage detected