File tree Expand file tree Collapse file tree 3 files changed +17
-4
lines changed
Expand file tree Collapse file tree 3 files changed +17
-4
lines changed Original file line number Diff line number Diff line change 2222- [ How do I debug issues with code-server?] ( #how-do-i-debug-issues-with-code-server )
2323- [ What is the healthz endpoint?] ( #what-is-the-healthz-endpoint )
2424- [ What is the heartbeat file?] ( #what-is-the-heartbeat-file )
25+ - [ How do I change the reconnection grace time?] ( #how-do-i-change-the-reconnection-grace-time )
2526- [ How do I change the password?] ( #how-do-i-change-the-password )
2627- [ Can I store my password hashed?] ( #can-i-store-my-password-hashed )
2728- [ Is multi-tenancy possible?] ( #is-multi-tenancy-possible )
@@ -326,6 +327,16 @@ If you want to shutdown code-server if there hasn't been an active connection
326327after a predetermined amount of time, you can use the --idle-timeout-seconds flag
327328or set an `CODE_SERVER_IDLE_TIMEOUT_SECONDS` environment variable.
328329
330+ # # How do I change the reconnection grace time?
331+
332+ Pass `--reconnection-grace-time <seconds>` to `code-server`, set
333+ ` CODE_SERVER_RECONNECTION_GRACE_TIME=<seconds>` , or add
334+ `reconnection-grace-time : <seconds>` to
335+ ` ~/.config/code-server/config.yaml` .
336+
337+ The default is `10800` (3 hours). If a client stays disconnected longer than
338+ this, it must reload the window.
339+
329340# # How do I change the password?
330341
331342Edit the `password` field in the code-server config file at
Original file line number Diff line number Diff line change @@ -639,8 +639,8 @@ export async function setDefaults(cliArgs: UserProvidedArgs, configArgs?: Config
639639 args [ "github-auth" ] = process . env . GITHUB_TOKEN
640640 }
641641
642- if ( process . env . CS_RECONNECTION_GRACE_TIME ) {
643- args [ "reconnection-grace-time" ] = process . env . CS_RECONNECTION_GRACE_TIME
642+ if ( process . env . CODE_SERVER_RECONNECTION_GRACE_TIME ) {
643+ args [ "reconnection-grace-time" ] = process . env . CODE_SERVER_RECONNECTION_GRACE_TIME
644644 }
645645
646646 if ( process . env . CODE_SERVER_IDLE_TIMEOUT_SECONDS ) {
Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ describe("parser", () => {
4949 delete process . env . CS_DISABLE_FILE_DOWNLOADS
5050 delete process . env . CS_DISABLE_GETTING_STARTED_OVERRIDE
5151 delete process . env . CS_RECONNECTION_GRACE_TIME
52+ delete process . env . CODE_SERVER_RECONNECTION_GRACE_TIME
5253 delete process . env . VSCODE_PROXY_URI
5354 delete process . env . CS_DISABLE_PROXY
5455 console . log = jest . fn ( )
@@ -461,8 +462,8 @@ describe("parser", () => {
461462 } )
462463 } )
463464
464- it ( "should use env var CS_RECONNECTION_GRACE_TIME " , async ( ) => {
465- process . env . CS_RECONNECTION_GRACE_TIME = "86400"
465+ it ( "should use env var CODE_SERVER_RECONNECTION_GRACE_TIME for reconnection grace time " , async ( ) => {
466+ process . env . CODE_SERVER_RECONNECTION_GRACE_TIME = "86400"
466467 const args = parse ( [ ] )
467468 expect ( args ) . toEqual ( { } )
468469
@@ -472,6 +473,7 @@ describe("parser", () => {
472473 "reconnection-grace-time" : "86400" ,
473474 } )
474475 delete process . env . CS_RECONNECTION_GRACE_TIME
476+ delete process . env . CODE_SERVER_RECONNECTION_GRACE_TIME
475477 } )
476478
477479 it ( "should error if password passed in" , ( ) => {
You can’t perform that action at this time.
0 commit comments