Skip to content

Commit fe82c1f

Browse files
committed
Add timeout detail comments
1 parent c4a5593 commit fe82c1f

5 files changed

Lines changed: 29 additions & 10 deletions

File tree

cs/src/Contracts/TunnelOptions.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,11 @@ public class TunnelOptions
9999
/// Gets or sets the timeout for HTTP requests to the tunnel or port.
100100
/// </summary>
101101
/// <remarks>
102-
/// The default timeout is 100 seconds. If the host does not return a response before the timeout,
103-
/// the tunnel relay aborts the request and returns 504 Gateway Timeout.
102+
/// The default timeout is 100 seconds. Set this to 0 to disable the timeout. The timeout
103+
/// will reset when response headers are received or after successfully reading or writing
104+
/// any request, response, or streaming data like gRPC or WebSockets. TCP keep-alives and
105+
/// HTTP/2 protocol pings will not reset the timeout, but WebSocket pings will. When a
106+
/// request times out, the tunnel relay aborts the request and returns 504 Gateway Timeout.
104107
/// </remarks>
105108
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingDefault)]
106109
public int? RequestTimeoutSeconds { get; set; }

go/tunnels/tunnel_options.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@ type TunnelOptions struct {
6161

6262
// Gets or sets the timeout for HTTP requests to the tunnel or port.
6363
//
64-
// The default timeout is 100 seconds. If the host does not return a response before the
65-
// timeout, the tunnel relay aborts the request and returns 504 Gateway Timeout.
64+
// The default timeout is 100 seconds. Set this to 0 to disable the timeout. The timeout
65+
// will reset when response headers are received or after successfully reading or writing
66+
// any request, response, or streaming data like gRPC or WebSockets. TCP keep-alives and
67+
// HTTP/2 protocol pings will not reset the timeout, but WebSocket pings will. When a
68+
// request times out, the tunnel relay aborts the request and returns 504 Gateway
69+
// Timeout.
6670
RequestTimeoutSeconds int32 `json:"requestTimeoutSeconds,omitempty"`
6771
}

java/src/main/java/com/microsoft/tunnels/contracts/TunnelOptions.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,12 @@ public class TunnelOptions {
9191
/**
9292
* Gets or sets the timeout for HTTP requests to the tunnel or port.
9393
*
94-
* The default timeout is 100 seconds. If the host does not return a response before
95-
* the timeout, the tunnel relay aborts the request and returns 504 Gateway Timeout.
94+
* The default timeout is 100 seconds. Set this to 0 to disable the timeout. The
95+
* timeout will reset when response headers are received or after successfully reading
96+
* or writing any request, response, or streaming data like gRPC or WebSockets. TCP
97+
* keep-alives and HTTP/2 protocol pings will not reset the timeout, but WebSocket
98+
* pings will. When a request times out, the tunnel relay aborts the request and
99+
* returns 504 Gateway Timeout.
96100
*/
97101
@Expose
98102
public int requestTimeoutSeconds;

rs/src/contracts/tunnel_options.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,12 @@ pub struct TunnelOptions {
7272

7373
// Gets or sets the timeout for HTTP requests to the tunnel or port.
7474
//
75-
// The default timeout is 100 seconds. If the host does not return a response before
76-
// the timeout, the tunnel relay aborts the request and returns 504 Gateway Timeout.
75+
// The default timeout is 100 seconds. Set this to 0 to disable the timeout. The
76+
// timeout will reset when response headers are received or after successfully reading
77+
// or writing any request, response, or streaming data like gRPC or WebSockets. TCP
78+
// keep-alives and HTTP/2 protocol pings will not reset the timeout, but WebSocket
79+
// pings will. When a request times out, the tunnel relay aborts the request and
80+
// returns 504 Gateway Timeout.
7781
#[serde(default)]
7882
pub request_timeout_seconds: Option<i32>,
7983
}

ts/src/contracts/tunnelOptions.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,12 @@ export interface TunnelOptions {
8080
/**
8181
* Gets or sets the timeout for HTTP requests to the tunnel or port.
8282
*
83-
* The default timeout is 100 seconds. If the host does not return a response before
84-
* the timeout, the tunnel relay aborts the request and returns 504 Gateway Timeout.
83+
* The default timeout is 100 seconds. Set this to 0 to disable the timeout. The
84+
* timeout will reset when response headers are received or after successfully reading
85+
* or writing any request, response, or streaming data like gRPC or WebSockets. TCP
86+
* keep-alives and HTTP/2 protocol pings will not reset the timeout, but WebSocket
87+
* pings will. When a request times out, the tunnel relay aborts the request and
88+
* returns 504 Gateway Timeout.
8589
*/
8690
requestTimeoutSeconds?: number;
8791
}

0 commit comments

Comments
 (0)