Commit graph

10 commits

Author SHA1 Message Date
KazWolfe
79971fc8d6
fix: Use AssemblyVersion for UserAgent header (#1974)
- Fixes a bug with local builds not being able to make HTTP requests
2024-07-25 21:30:36 +02:00
Kaz Wolfe
2bdd0dbe7b
Use new version format in a few other places 2024-07-18 21:00:41 -07:00
goat
448b0d16ea
Add "loading dialog" for service init, unify blocking logic (#1779)
* wip

* hacky fix for overlapping event text in profiler

* move IsResumeGameAfterPluginLoad logic to PluginManager

* fix some warnings

* handle exceptions properly

* remove ability to cancel, rename button to "hide" instead

* undo Dalamud.Service refactor for now

* warnings

* add explainer, show which plugins are still loading

* add some text if loading takes more than 3 minutes

* undo wrong CS merge
2024-04-21 17:28:37 +02:00
Soreepeong
7f5ef03917 Use EarlyLoadedService for anything that is not mandatory for kicking off plugin loader 2024-04-07 21:53:23 +09:00
srkizer
87b9edb448
Add IInternal/PublicDisposableService (#1696)
* Add IInternal/PublicDisposableService

Plugins are exposed interfaces that are not inherited from
`IDisposable`, but services implementing plugin interfaces often
implement `IDisposable`. Some plugins may try to call
`IDisposable.Dispose` on everything provided, and it also is possible to
use `using` clause too eagerly while working on Dalamud itself, such as
writing `using var smth = await Service<SomeService>.GetAsync();`. Such
behaviors often lead to a difficult-to-debug errors, and making those
services either not an `IDisposable` or making `IDisposable.Dispose` do
nothing if the object has been loaded would prevent such errors. As
`ServiceManager` must be the only class dealing with construction and
disposal of services, `IInternalDisposableService` has been added to
limit who can dispose the object. `IPublicDisposableService` also has
been added to classes that can be constructed and accessed directly by
plugins; for those, `Dispose` will be ignored if the instance is a
service instance, and only `DisposeService` will respond.

In addition, `DalamudPluginInterface` and `UiBuilder` also have been
changed so that their `IDisposable.Dispose` no longer respond, and
instead, internal functions have been added to only allow disposal from
Dalamud.

* Cleanup

* Postmerge fixes

* More explanation on RunOnFrameworkThread(ClearHooks)

* Mark ReliableFileStorage public ctor obsolete

---------

Co-authored-by: goat <16760685+goaaats@users.noreply.github.com>
2024-03-16 15:58:05 +00:00
Anna
fcebd15077
Send Dalamud user-agent when downloading plugins (#1550)
Sets the user-agent on all HappyHttp requests to `Dalamud/<Version>`, and pass `Accept: application/zip` in plugin downloads.
2023-11-28 09:04:36 -08:00
KazWolfe
956e310041
Clean up Happy Eyeballs Verbose Spam (#1224)
* Clean up HappyEyeballs verbose spam

- Cancellations should be properly suppressed now

* Bump ClientStructs
2023-05-28 22:46:49 -07:00
Kaz Wolfe
ec829b4eee
Add logging for faulted tasks on successful connections
- Diagnostic tool, we don't really care about these exceptions.
2023-04-29 13:22:15 -07:00
Kaz Wolfe
76190d7e59
Happy Eyeballs Rev 2: The DNS-ening
Instead of simply trying a V6 connection and following it with a plain V4 connection, this method relies on DNS to make some smarter decisions on resolution. This improves performance and reliability for users (and servers) without IPv6 connectivity at all.

- Switch to a DNS-driven strategy for Happy Eyeballs
- Add a Zipper Merge and CancellableDelay utility to the corups
- Remove state from HappyEyeballsCallback as it largely went unused
- Fix a couple small implementation bugs
- Suppress innocent (unhandled) exceptions.
2023-04-27 00:00:45 -07:00
KazWolfe
6a0b4e5ad7
Add Happy Eyeballs Support (#1187) 2023-04-23 11:09:55 +02:00