Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Haiku: Prevent unsupported API calls
Guard some advanced network APIs that are marked "unsupported" by Haiku
with compile time macros.
  • Loading branch information
trungnt2910 committed Nov 21, 2025
commit 849d0ba49e450bfc7eb0ccbe99c5b00cdf797d27
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ internal void HandleAltSvc(IEnumerable<string> altSvcHeaderValues, TimeSpan? res

if (!nextAuthorityPersist)
{
#if !ILLUMOS && !SOLARIS
#if !ILLUMOS && !SOLARIS && !HAIKU
_poolManager.StartMonitoringNetworkChanges();
#endif
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ internal sealed class HttpConnectionPoolManager : IDisposable
private readonly IWebProxy? _proxy;
private readonly ICredentials? _proxyCredentials;

#if !ILLUMOS && !SOLARIS
#if !ILLUMOS && !SOLARIS && !HAIKU
private NetworkChangeCleanup? _networkChangeCleanup;
#endif

Expand Down Expand Up @@ -139,7 +139,7 @@ public HttpConnectionPoolManager(HttpConnectionSettings settings)
}
}

#if !ILLUMOS && !SOLARIS
#if !ILLUMOS && !SOLARIS && !HAIKU
/// <summary>
/// Starts monitoring for network changes. Upon a change, <see cref="HttpConnectionPool.OnNetworkChanged"/> will be
/// called for every <see cref="HttpConnectionPool"/> in the <see cref="HttpConnectionPoolManager"/>.
Expand Down Expand Up @@ -457,7 +457,7 @@ public void Dispose()
pool.Value.Dispose();
}

#if !ILLUMOS && !SOLARIS
#if !ILLUMOS && !SOLARIS && !HAIKU
_networkChangeCleanup?.Dispose();
#endif
}
Expand Down
Loading