Skip to content

Commit

Permalink
update func calls
Browse files Browse the repository at this point in the history
  • Loading branch information
ginuerzh committed Feb 9, 2020
1 parent ece7994 commit 8121e20
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gost.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (
)

// Version is the gost version.
const Version = "2.10.1"
const Version = "2.10.1-dev"

// Debug is a flag that enables the debug log.
var Debug bool
Expand Down
3 changes: 2 additions & 1 deletion redirect.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ func (h *tcpRedirectHandler) Handle(c net.Conn) {

log.Logf("[red-tcp] %s -> %s", srcAddr, dstAddr)

cc, err := h.options.Chain.Dial(dstAddr.String(),
cc, err := h.options.Chain.DialContext(context.Background(),
"tcp", dstAddr.String(),
RetryChainOption(h.options.Retries),
TimeoutChainOption(h.options.Timeout),
)
Expand Down
2 changes: 1 addition & 1 deletion udp.go
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ func (c *udpClientConn) WriteTo(b []byte, addr net.Addr) (int, error) {
}

func (c *udpClientConn) ReadFrom(b []byte) (n int, addr net.Addr, err error) {
n, err = c.Read(b)
n, err = c.UDPConn.Read(b)
addr = c.RemoteAddr()
return
}

0 comments on commit 8121e20

Please sign in to comment.