Browse Source

fix a bug preventing sending more than once over a peer data channel

bugfix
erinn 1 year ago
parent
commit
9eeefae88d
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      peer/peer/peer_data_channel.go

+ 1
- 1
peer/peer/peer_data_channel.go View File

@@ -92,7 +92,7 @@ func (cpc *CwtchPeerDataChannel) OpenOutboundResult(err error, crm *Protocol_Dat
// Packet is called for each raw packet received on this channel.
func (cpc *CwtchPeerDataChannel) Packet(data []byte) {
ret := cpc.Handler.HandlePacket(data)
if len(ret) >= 0 {
if len(ret) > 0 {
cpc.channel.SendMessage(ret)
}
}

Loading…
Cancel
Save