test(stream): add unit tests for stream behavior

- Fix duplicating EOF error when closing SSH connection
- Add new SessionStatusCLOSED type
This commit is contained in:
2026-01-22 21:04:05 +07:00
parent 3fd179d32b
commit 3029996773
10 changed files with 775 additions and 117 deletions
+4 -1
View File
@@ -72,7 +72,10 @@ func (hs *http) ResponseMiddlewares() []middleware.ResponseMiddleware {
}
func (hs *http) Close() error {
return hs.writer.(io.Closer).Close()
if closer, ok := hs.writer.(io.Closer); ok {
return closer.Close()
}
return nil
}
func (hs *http) CloseWrite() error {