@@ -65,21 +65,21 @@ func init() {
65
65
// Globally disable network namespacing. All networking happens in
66
66
// userspace.
67
67
netns .SetEnabled (false )
68
- // Tailscale, by default, "trims" the set of peers down to ones that we are "actively" communicating with in
69
- // an effort to save memory. But, we want to make sure the Wireguard connection is up and handshaked before sending
70
- // TCP traffic over it to avoid anomalously long round-trip time of the initial handshake
71
- // c.f. https://github.com/coder/coder/issues/7388#issuecomment-1625463069 for more details.
68
+ // Tailscale, by default, "trims" the set of peers down to ones that we are
69
+ // "actively" communicating with in an effort to save memory. Since
70
+ // Tailscale removed keep-alives, it seems like open but idle connections
71
+ // (SSH, port-forward, etc) can get trimmed fairly easily, causing hangs for
72
+ // a few seconds while the connection is setup again.
72
73
//
73
- // If Tailscale is waiting for traffic to bring up Wireguard, and we wait for Wireguard to send traffic, that's a
74
- // deadlock. So, disable this feature.
75
- //
76
- // Note that Tailscale.com's use case is very different from ours: in their use case, users create one persistent
77
- // tailnet per device, and it allows connections to every other thing in Tailscale that belongs to them. The
74
+ // Note that Tailscale.com's use case is very different from ours: in their
75
+ // use case, users create one persistent tailnet per device, and it allows
76
+ // connections to every other thing in Tailscale that belongs to them. The
78
77
// tailnet stays up as long as your laptop or phone is turned on.
79
78
//
80
- // Our use case is different: for clients, it's a point-to-point connection to a single workspace, and lasts only as
81
- // long as the connection. For agents, it's connections to a small number of clients (CLI or Coderd) that are being
82
- // actively used by the end user.
79
+ // Our use case is different: for clients, it's a point-to-point connection
80
+ // to a single workspace, and lasts only as long as the connection. For
81
+ // agents, it's connections to a small number of clients (CLI or Coderd)
82
+ // that are being actively used by the end user.
83
83
envknob .Setenv ("TS_DEBUG_TRIM_WIREGUARD" , "false" )
84
84
}
85
85
0 commit comments