Skip to content

Commit

Permalink
Fix leak in reality server
Browse files Browse the repository at this point in the history
  • Loading branch information
nekohasekai committed Jan 7, 2025
1 parent e483c90 commit ac93286
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions common/tls/reality_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,9 @@ func (c *realityConnWrapper) ConnectionState() ConnectionState {
func (c *realityConnWrapper) Upstream() any {
return c.Conn
}

// Due to low implementation quality, the reality server intercepted half close and caused memory leaks.
// We fixed it by calling Close() directly.
func (c *realityConnWrapper) CloseWrite() error {
return c.Close()
}

0 comments on commit ac93286

Please sign in to comment.