重构输出流转发, TransStream不再持有Sink

This commit is contained in:
yangjiechina
2024-10-28 19:15:53 +08:00
parent 9090e28077
commit ec707c8dc1
27 changed files with 894 additions and 747 deletions

View File

@@ -44,7 +44,7 @@ func init() {
type session struct {
conn net.Conn
sink_ *sink
sink *Sink
sessionId string
writeBuffer *bytes.Buffer //响应体缓冲区
state SessionState
@@ -89,9 +89,9 @@ func (s *session) close() {
s.conn = nil
}
if s.sink_ != nil {
s.sink_.Close()
s.sink_ = nil
if s.sink != nil {
s.sink.Close()
s.sink = nil
}
}