forked from cwtch.im/cwtch
fix a bug preventing sending more than once over a peer data channel
This commit is contained in:
parent
011866c1bc
commit
9eeefae88d
|
@ -92,7 +92,7 @@ func (cpc *CwtchPeerDataChannel) OpenOutboundResult(err error, crm *Protocol_Dat
|
||||||
// Packet is called for each raw packet received on this channel.
|
// Packet is called for each raw packet received on this channel.
|
||||||
func (cpc *CwtchPeerDataChannel) Packet(data []byte) {
|
func (cpc *CwtchPeerDataChannel) Packet(data []byte) {
|
||||||
ret := cpc.Handler.HandlePacket(data)
|
ret := cpc.Handler.HandlePacket(data)
|
||||||
if len(ret) >= 0 {
|
if len(ret) > 0 {
|
||||||
cpc.channel.SendMessage(ret)
|
cpc.channel.SendMessage(ret)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue