# http/sse-close
Close a Server-Sent Events stream cleanly: queue the terminal chunk,
flush pending bytes, fire `:on-close`, and close the connection.
## Syntax
[http/sse-close $stream]
## Parameters
- `$stream` — `%SseStream{}` from `http/sse`
## Examples
[http/sse-close $stream] # → true [http/sse-close $stream] # → false (already closed)
## Returns
`true` on the first close, `false` if already closed; `%Err{:message}` when
the argument is not a stream. Later `http/sse-send` calls return `%Err`.
Dropping the last stream reference also tears the connection down at GC,
but without firing `:on-close`.
## See Also
`http/sse`, `http/sse-send`, `http/sse-comment`