Skip to content

Commit

Permalink
fix a little sooti
Browse files Browse the repository at this point in the history
  • Loading branch information
uoosef committed Oct 4, 2023
1 parent da8de31 commit f5def5b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,15 +126,15 @@ func (client *Client) handleRequest() {

rConn, err := net.Dial(network, address)

defer func() {
_ = rConn.Close()
}()

if err != nil {
log.Println(fmt.Errorf("failed to connect to socket: %v", err))
return
}

defer func() {
_ = rConn.Close()
}()

// transmit data
go Copy(client.conn, rConn)
Copy(rConn, client.conn)
Expand Down

0 comments on commit f5def5b

Please sign in to comment.