Fix issue where the control socket should not be used as a streamsession
This commit is contained in:
10
dial.go
10
dial.go
@ -76,10 +76,16 @@ func (c *Client) DialStreamingContextFree(addr string) (net.Conn, error) {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
if c.d == nil {
|
||||
c.d, err = c.NewClient(c.NewID())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
|
||||
err = c.StreamConnect(addr)
|
||||
err = c.d.StreamConnect(addr)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return c.SamConn, nil
|
||||
return c.d.SamConn, nil
|
||||
}
|
||||
|
Reference in New Issue
Block a user