mirror of
https://github.com/go-i2p/goSam.git
synced 2025-06-09 09:32:59 -04:00
Fix session ID issue, we only need a new session when we really need a new session, i.e. give people a way to ask for it instead of trying to guess
This commit is contained in:
3
dial.go
3
dial.go
@ -9,6 +9,8 @@ import (
|
||||
|
||||
// DialContext implements the net.DialContext function and can be used for http.Transport
|
||||
func (c *Client) DialContext(ctx context.Context, network, addr string) (net.Conn, error) {
|
||||
c.oml.Lock()
|
||||
defer c.oml.Unlock()
|
||||
errCh := make(chan error, 1)
|
||||
connCh := make(chan net.Conn, 1)
|
||||
go func() {
|
||||
@ -42,7 +44,6 @@ func (c *Client) dialCheck(addr string) (int32, bool) {
|
||||
return c.NewID(), true
|
||||
} else if c.lastaddr != addr {
|
||||
fmt.Println("Preparing to dial next new address.")
|
||||
return c.NewID(), true
|
||||
}
|
||||
return c.id, false
|
||||
}
|
||||
|
Reference in New Issue
Block a user