test dial/listen in the sim

This commit is contained in:
Arceliar 2020-05-02 10:01:09 -05:00
parent 5db93be4df
commit 72afa05029
4 changed files with 63 additions and 6 deletions

View file

@ -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() }()