Commit Graph

3 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
4c8f5c21a3
Improve power lock logic (#118) 2022-01-23 09:49:35 -08:00
Dane Everitt
c52db4eec0 Add test coverage for sinks; prevent panic on nil channels 2022-01-23 10:41:12 -05:00