1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-26 03:55:26 -05:00

fix usage of ray stream.

This commit is contained in:
Darien Raymond
2016-12-30 00:51:39 +01:00
parent 609dbc1f13
commit f6aa7a0053
9 changed files with 29 additions and 24 deletions

View File

@@ -175,11 +175,11 @@ func (v *Server) handleConnection(conn internet.Connection) {
User: request.User,
Inbound: v.meta,
})
defer ray.InboundOutput().Release()
defer ray.InboundOutput().ForceClose()
defer ray.InboundInput().Close()
requestDone := signal.ExecuteAsync(func() error {
defer ray.InboundOutput().Release()
defer ray.InboundOutput().ForceClose()
bufferedWriter := bufio.NewWriter(conn)
defer bufferedWriter.Release()