mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-29 14:45:07 +03:00
test dial/listen in the sim
This commit is contained in:
parent
5db93be4df
commit
72afa05029
4 changed files with 63 additions and 6 deletions
|
@ -3,7 +3,6 @@ package yggdrasil
|
|||
import (
|
||||
"errors"
|
||||
"github.com/Arceliar/phony"
|
||||
"github.com/yggdrasil-network/yggdrasil-go/src/util"
|
||||
)
|
||||
|
||||
type Simlink struct {
|
||||
|
@ -44,7 +43,7 @@ func (s *Simlink) writeMsgs(msgs [][]byte) (int, error) {
|
|||
var size int
|
||||
for _, msg := range msgs {
|
||||
size += len(msg)
|
||||
bs := append(util.GetBytes(), msg...)
|
||||
bs := append([]byte(nil), msg...)
|
||||
phony.Block(s, func() {
|
||||
s.dest.Act(s, func() {
|
||||
defer func() { recover() }()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue