GoToSocial/internal/processing/stream
kim 291e180990
[bugfix] fix possible mutex lockup during streaming code (#2633)
* rewrite Stream{} to use much less mutex locking, update related code

* use new context for the stream context

* ensure stream gets closed on return of writeTo / readFrom WSConn()

* ensure stream write timeout gets cancelled

* remove embedded context type from Stream{}, reformat log messages for consistency

* use c.Request.Context() for context passed into Stream().Open()

* only return 1 boolean, fix tests to expect multiple stream types in messages

* changes to ping logic

* further improved ping logic

* don't export unused function types, update message sending to only include relevant stream type

* ensure stream gets closed 🤦

* update to error log on failed json marshal (instead of panic)

* inverse websocket read error checking to _ignore_ expected close errors
2024-02-20 18:07:49 +00:00
..
authorize.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
authorize_test.go [performance] retry db queries on busy errors (#2025) 2023-07-25 10:34:05 +02:00
delete.go [bugfix] fix possible mutex lockup during streaming code (#2633) 2024-02-20 18:07:49 +00:00
notification.go [bugfix] fix possible mutex lockup during streaming code (#2633) 2024-02-20 18:07:49 +00:00
notification_test.go [bugfix] fix possible mutex lockup during streaming code (#2633) 2024-02-20 18:07:49 +00:00
open.go [bugfix] fix possible mutex lockup during streaming code (#2633) 2024-02-20 18:07:49 +00:00
open_test.go [chore] Improve copyright header handling (#1608) 2023-03-12 16:00:57 +01:00
statusupdate.go [bugfix] fix possible mutex lockup during streaming code (#2633) 2024-02-20 18:07:49 +00:00
statusupdate_test.go [bugfix] fix possible mutex lockup during streaming code (#2633) 2024-02-20 18:07:49 +00:00
stream.go [bugfix] fix possible mutex lockup during streaming code (#2633) 2024-02-20 18:07:49 +00:00
stream_test.go [feature] Push status edit messages into open streams (#2418) 2023-12-16 12:55:49 +01:00
update.go [bugfix] fix possible mutex lockup during streaming code (#2633) 2024-02-20 18:07:49 +00:00