Skip to content

Commit

Permalink
revert packet concatenation
Browse files Browse the repository at this point in the history
  • Loading branch information
sekaiwish committed Nov 9, 2024
1 parent 7bf2fd5 commit ab7bb0d
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions server/channelserver/sys_session.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,12 @@ func (s *Session) sendLoop() {
if s.closed {
return
}
err := s.cryptConn.SendPacket(append(pkt.data, []byte{0x00, 0x10}...))
if err != nil {
s.logger.Warn("Failed to send packet")
for len(s.sendPackets) > 0 {
pkt = <-s.sendPackets
err := s.cryptConn.SendPacket(append(pkt.data, []byte{0x00, 0x10}...))
if err != nil {
s.logger.Warn("Failed to send packet")
}
}
time.Sleep(time.Duration(_config.ErupeConfig.LoopDelay) * time.Millisecond)
}
Expand Down

0 comments on commit ab7bb0d

Please sign in to comment.