ngld / OverlayPlugin

Yet another OverlayPlugin fork.
Other
231 stars 39 forks source link

Dead connections do not seem to clean up, causing performance issue #237

Open xpdota opened 2 years ago

xpdota commented 2 years ago

Repro:

  1. Start ACT
  2. Enable OverlayPlugin WS under Stream/Local Overlay
  3. Make sure there are no errors. Everything should be working.
  4. Connect and disconnect something from the OverlayPlugin Websocket connection (preferably a hard disconnect with no chance for cleanup) You will start to see these:
    [12/24/2021 10:30:45 PM] Warning: WSServer: Data sent while closing or after close. Ignoring. 
    [12/24/2021 10:30:48 PM] Warning: WSServer: Data sent while closing or after close. Ignoring. 
    [12/24/2021 10:30:48 PM] Warning: WSServer: Data sent while closing or after close. Ignoring. 
    [12/24/2021 10:30:48 PM] Warning: WSServer: Data sent while closing or after close. Ignoring. 
    [12/24/2021 10:30:48 PM] Warning: WSServer: Data sent while closing or after close. Ignoring. 
  5. Connect and disconnect a few more times. You'll start to see one message for each connection you closed, every time WS data would have been sent.
  6. If you do this enough, you may bump into the dreaded "Line parsing is 10 seconds behind" message and ACT must be closed to recover.
ngld commented 2 years ago

Can you check if you're on OverlayPlugin 0.18.0 or later? I've fixed a related bug in 0.17.3: cbeb87372855ac8edc1d642806149a96c0b662b6

However, if this is still happening, Fleck isn't emitting an OnClose event for the closed connection which means that I'll have to check the connection state every time I'm about to send something which I'd rather avoid.

xpdota commented 2 years ago

Yes, I am on 0.18.0.0.