fix channel routing exiting after first packet. fix packet channel type not being injected

This commit is contained in:
mykola2312 2025-01-18 12:18:52 +02:00
parent a132ecb6fa
commit 16a95dc7d8

View file

@ -209,6 +209,7 @@ func channelReceiver(r *LuxRouter, channel *LuxChannel) {
var dgram LuxDatagram
var err error
for {
select {
case <-channel.control:
return
@ -220,6 +221,7 @@ func channelReceiver(r *LuxRouter, channel *LuxChannel) {
return
}
}
}
}
func (r *LuxRouter) Start() {
@ -340,6 +342,7 @@ func (r *LuxRouter) Recv() (LuxPacket, error) {
}
// packet arrived to right route and successfully decrypted
packet.ChannelType = dgram.Channel.Type
return packet, nil
} else {
// first time seeing peer - bruteforce keys from keystore