Skip to content

Commit

Permalink
Remove freeLocalPort from Conn
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkren committed Sep 16, 2019
1 parent f68b3e0 commit a161a2d
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pkg/app2/conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ import (

// Conn is a connection from app client to the server.
type Conn struct {
id uint16
rpc ServerRPCClient
local routing.Addr
remote routing.Addr
freeLocalPort func()
id uint16
rpc ServerRPCClient
local routing.Addr
remote routing.Addr
}

func (c *Conn) Read(b []byte) (int, error) {
Expand All @@ -26,8 +25,6 @@ func (c *Conn) Write(b []byte) (int, error) {
}

func (c *Conn) Close() error {
defer c.freeLocalPort()

return c.rpc.CloseConn(c.id)
}

Expand Down

0 comments on commit a161a2d

Please sign in to comment.