SignalK / signalk-server

An implementation of a Signal K central server for boats.
http://signalk.org
Apache License 2.0
298 stars 150 forks source link

fix: check ws max send buffer size over time #1719

Closed tkurki closed 2 months ago

tkurki commented 2 months ago

Fixes https://github.com/SignalK/signalk-server/issues/1718

Do not immediately hand ws up if the max send buffer size is exceeded, but start monitoring for MAXSENDBUFFERCHECKTIME milliseconds. If the buffer remains above the threshold all the time terminate the connection. If the buffer has dropped below the threshold during subsequent writes to the ws connection the timer is reset.