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