Skip to content

Commit

Permalink
Merge pull request #66 from XDagger/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
swordlet authored Aug 12, 2023
2 parents cd0e630 + dde5605 commit a076aa7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
)

var (
version = "2.0.3"
version = "2.0.4"

// cmd line options
configFile *string
Expand Down
8 changes: 6 additions & 2 deletions server/proxy/proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,12 @@ func (p *Proxy) handleNotification(notif []byte) {
}

func (p *Proxy) connect(minerName string) error {
// p.connMu.Lock()
// defer p.connMu.Unlock()
p.connMu.Lock()
defer p.connMu.Unlock()

if p.isClosed {
return errors.New("using closed proxy error")
}

var conn net.Conn
var socks5Dialer proxy.Dialer
Expand Down
2 changes: 1 addition & 1 deletion server/tcp/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ func StartServer() {
if err != nil {
logger.Get().Println("Unable to accept connection: ", err)
}
conn.SetReadDeadline(time.Now().Add(45 * time.Second))
conn.SetReadDeadline(time.Now().Add(90 * time.Second))

// if !limit.Allow() {
// logger.Get().Println("Out of rate limit:", rl, "per 25 ms.")
Expand Down

0 comments on commit a076aa7

Please sign in to comment.