mirror of
https://github.com/cryptonote-social/csminer.git
synced 2024-09-11 05:35:23 +03:00
fix address & agent caching in client
This commit is contained in:
parent
07a6e9794d
commit
cbf938a52c
@ -58,7 +58,6 @@ type MultiClientJob struct {
|
||||
|
||||
type Client struct {
|
||||
address string
|
||||
agent string
|
||||
conn net.Conn
|
||||
responseChannel chan *SubmitWorkResponse
|
||||
jobChannel chan *MultiClientJob
|
||||
@ -89,6 +88,7 @@ func (cl *Client) Connect(
|
||||
if cl.alive {
|
||||
return errors.New("client already connected. call close first if you wish to reconnect"), 0, ""
|
||||
}
|
||||
cl.address = address
|
||||
if !useTLS {
|
||||
cl.conn, err = net.DialTimeout("tcp", address, time.Second*30)
|
||||
} else {
|
||||
@ -117,7 +117,7 @@ func (cl *Client) Connect(
|
||||
Login: uname,
|
||||
Pass: pw,
|
||||
RigID: rigid,
|
||||
Agent: cl.agent,
|
||||
Agent: agent,
|
||||
},
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user