Commit Graph

5 Commits

Author SHA1 Message Date
Dane Everitt
fab88a380e Use buffered channels and ring-buffer logic when processing console data
This change fixes pterodactyl/panel#3921 by implementing logic to drop the oldest message in a channel and push the newest message onto the channel when the channel buffer is full.

This is distinctly different than the previous implementation which just dropped the newest messages, leading to confusing behavior on the client side when a large amount of data was sent over the connection.

Up to 10ms per channel is allowed for blocking before falling back to the drop logic.
2022-01-30 10:55:45 -05:00
Dane Everitt
c52db4eec0 Add test coverage for sinks; prevent panic on nil channels 2022-01-23 10:41:12 -05:00
Dane Everitt
a4904365c9 Sink pool cleanup and organization; better future support when we add more sinks 2022-01-23 09:57:25 -05:00
Matthew Penner
4ba5fe2866
events: don't explode when destroying a bus
Only attempt to close channels once, rather than per topic
they are subscribed to.
2022-01-20 09:48:18 -07:00
Matthew Penner
649dc9663e
Server Event Optimizations (#116) 2022-01-17 20:23:29 -07:00