mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2024-11-23 18:15:24 +00:00
stop synchronizing message reads for now, not 100% safe but I don't have any better ideas
This commit is contained in:
parent
209d2ffea5
commit
99be6b037d
@ -392,7 +392,10 @@ func (intf *linkInterface) handler() error {
|
|||||||
msg, err := intf.msgIO.readMsg()
|
msg, err := intf.msgIO.readMsg()
|
||||||
if len(msg) > 0 {
|
if len(msg) > 0 {
|
||||||
// TODO rewrite this if the link becomes an actor
|
// TODO rewrite this if the link becomes an actor
|
||||||
<-intf.peer.SyncExec(func() { intf.peer._handlePacket(msg) })
|
// FIXME this could theoretically send traffic faster than the peer can handle
|
||||||
|
// The alternative is to SyncExec, but that causes traffic to block while *other* links work
|
||||||
|
// Need to figure out why and find a workaround
|
||||||
|
intf.peer.handlePacketFrom(nil, msg)
|
||||||
}
|
}
|
||||||
if err != nil {
|
if err != nil {
|
||||||
if err != io.EOF {
|
if err != io.EOF {
|
||||||
|
Loading…
Reference in New Issue
Block a user