mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 06:35:07 +03:00
Add per-session read/write workers, work in progress, they still unfortunately need to take a mutex for safety
This commit is contained in:
parent
a2966291b9
commit
df0090e32a
4 changed files with 106 additions and 54 deletions
|
@ -69,6 +69,7 @@ func (d *Dialer) DialByNodeIDandMask(nodeID, nodeMask *crypto.NodeID) (*Conn, er
|
|||
defer t.Stop()
|
||||
select {
|
||||
case <-conn.session.init:
|
||||
conn.session.startWorkers(conn.cancel)
|
||||
return conn, nil
|
||||
case <-t.C:
|
||||
conn.Close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue