GoToSocial/internal/api
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
..
activitypub [chore] chore rationalise http return codes for activitypub handlers (#2540) 2024-01-18 17:11:13 +01:00
auth [chore] Refactor HTML templates and CSS (#2480) 2023-12-27 11:23:52 +01:00
client [bugfix] fix possible mutex lockup during streaming code (#2633) 2024-02-20 18:07:49 +00:00
fileserver [feature] Ratelimit + serve emoji images on separate router group (#2548) 2024-01-22 15:17:04 +00:00
metrics [chore/bugfix] Fix double gzip on prometheus endpoint (#2383) 2023-11-23 19:10:51 +01:00
model [feature] Add `requested_by` to relationship model (#2672) 2024-02-20 17:50:54 +00:00
nodeinfo [performance] http response encoding / writing improvements (#2374) 2023-11-27 14:00:57 +00:00
util [chore] also allow text/xml in place of application/xml (#2640) 2024-02-14 13:07:58 +01:00
wellknown [performance] http response encoding / writing improvements (#2374) 2023-11-27 14:00:57 +00:00
activitypub.go [feature/performance] Wrap incoming HTTP requests in timeout handler (#2353) 2023-11-13 19:48:51 +01:00
auth.go [feature/performance] Wrap incoming HTTP requests in timeout handler (#2353) 2023-11-13 19:48:51 +01:00
client.go [feature/performance] Wrap incoming HTTP requests in timeout handler (#2353) 2023-11-13 19:48:51 +01:00
fileserver.go [feature] Ratelimit + serve emoji images on separate router group (#2548) 2024-01-22 15:17:04 +00:00
metrics.go [chore/bugfix] Fix double gzip on prometheus endpoint (#2383) 2023-11-23 19:10:51 +01:00
nodeinfo.go [feature/performance] Wrap incoming HTTP requests in timeout handler (#2353) 2023-11-13 19:48:51 +01:00
wellknown.go [feature/performance] Wrap incoming HTTP requests in timeout handler (#2353) 2023-11-13 19:48:51 +01:00