mirror of
https://github.com/Mezeporta/Erupe.git
synced 2025-12-13 07:25:03 +01:00
support printing non-blocking packets
This commit is contained in:
@@ -116,10 +116,9 @@ func (s *Session) QueueSend(data []byte) {
|
||||
func (s *Session) QueueSendNonBlocking(data []byte) {
|
||||
select {
|
||||
case s.sendPackets <- packet{data, true}:
|
||||
// Enqueued data
|
||||
s.logMessage(binary.BigEndian.Uint16(data[0:2]), data, "Server", s.Name)
|
||||
default:
|
||||
s.logger.Warn("Packet queue too full, dropping!")
|
||||
// Queue too full
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user