-
-
Couldn't load subscription status.
- Fork 3.1k
Implement package fetch retries #25120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 11 commits
49a3c9b
6838006
b76fb56
4bc9c51
fecd95f
9af1ed3
4c2de34
b409e41
f984f60
6b3f0c4
533908e
b114de2
dee31f7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1063,7 +1063,7 @@ pub const Request = struct { | |
| try w.writeAll("\r\n"); | ||
| } | ||
|
|
||
| pub const ReceiveHeadError = http.Reader.HeadError || ConnectError || error{ | ||
| pub const ReceiveHeadError = http.Reader.HeadError || RequestError || error{ | ||
| /// Server sent headers that did not conform to the HTTP protocol. | ||
| /// | ||
| /// To find out more detailed diagnostics, `http.Reader.head_buffer` can be | ||
|
|
@@ -1394,6 +1394,8 @@ pub const ConnectTcpError = Allocator.Error || error{ | |
| HostLacksNetworkAddresses, | ||
| UnexpectedConnectFailure, | ||
| TlsInitializationFailed, | ||
| AddressInUse, | ||
| SystemResources, | ||
| }; | ||
|
|
||
| /// Reuses a `Connection` if one matching `host` and `port` is already open. | ||
|
|
@@ -1440,6 +1442,8 @@ pub fn connectTcpOptions(client: *Client, options: ConnectTcpOptions) ConnectTcp | |
| error.NameServerFailure => return error.NameServerFailure, | ||
| error.UnknownHostName => return error.UnknownHostName, | ||
| error.HostLacksNetworkAddresses => return error.HostLacksNetworkAddresses, | ||
| error.AddressInUse => return error.AddressInUse, | ||
| error.SystemResources => return error.SystemResources, | ||
| else => return error.UnexpectedConnectFailure, | ||
| }; | ||
| errdefer stream.close(); | ||
|
|
@@ -1562,8 +1566,6 @@ pub fn connectProxied( | |
| }; | ||
| } | ||
|
|
||
| pub const ConnectError = ConnectTcpError || RequestError; | ||
|
|
||
| /// Connect to `host:port` using the specified protocol. This will reuse a | ||
| /// connection if one is already open. | ||
| /// | ||
|
|
@@ -1576,7 +1578,7 @@ pub fn connect( | |
| host: []const u8, | ||
| port: u16, | ||
| protocol: Protocol, | ||
| ) ConnectError!*Connection { | ||
| ) ConnectTcpError!*Connection { | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| const proxy = switch (protocol) { | ||
| .plain => client.http_proxy, | ||
| .tls => client.https_proxy, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ConnectErroris same asRequestError. Is deletingConnectErrorthe right move? Would it be better to leave it in with a doc comment about how it's being deprecated and what to use instead?