diff --git a/docs/settingup.md b/docs/settingup.md index 51021bb1..5435dfa7 100644 --- a/docs/settingup.md +++ b/docs/settingup.md @@ -2533,7 +2533,7 @@ Settings specific to the `simple` scheduler. * `instance`: Instance number for this instance. Use different instance numbers when running the same script in multiple instances to make sure the randomization is different in each instance. Defaults to 1. * `reconnectsettings`: Settings for enabling re-connection attempts in case of unexpected disconnects. * `reconnect`: Enable re-connection attempts if the WebSocket is disconnected. Defaults to `false`. - * `backoff`: Re-connection backoff scheme. Defaults to `[0.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]`, if left empty. An example backoff scheme could be `[0.0, 1.0, 10.0, 20.0]`: + * `backoff`: Re-connection backoff scheme. Defaults to `[0.0, 2.0, 2.0, 2.0, 2.0, 2.0, 4.0, 4.0, 8.0, 12.0, 16.0]`, if left empty. An example backoff scheme could be `[0.0, 1.0, 10.0, 20.0]`: * `0.0`: If the WebSocket is disconnected, wait 0.0s before attempting to re-connect * `1.0`: If the previous attempt to re-connect failed, wait 1.0s before attempting again * `10.0`: If the previous attempt to re-connect failed, wait 10.0s before attempting again diff --git a/generatedocs/data/params.json b/generatedocs/data/params.json index 8cb92c98..5c1e08b2 100644 --- a/generatedocs/data/params.json +++ b/generatedocs/data/params.json @@ -490,7 +490,7 @@ "Enable re-connection attempts if the WebSocket is disconnected. Defaults to `false`." ], "reconnectsettings.backoff" : [ - "Re-connection backoff scheme. Defaults to `[0.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]`, if left empty. An example backoff scheme could be `[0.0, 1.0, 10.0, 20.0]`:", + "Re-connection backoff scheme. Defaults to `[0.0, 2.0, 2.0, 2.0, 2.0, 2.0, 4.0, 4.0, 8.0, 12.0, 16.0]`, if left empty. An example backoff scheme could be `[0.0, 1.0, 10.0, 20.0]`:", "`0.0`: If the WebSocket is disconnected, wait 0.0s before attempting to re-connect", "`1.0`: If the previous attempt to re-connect failed, wait 1.0s before attempting again", "`10.0`: If the previous attempt to re-connect failed, wait 10.0s before attempting again", diff --git a/generatedocs/generated/documentation.go b/generatedocs/generated/documentation.go index 71326c1e..b598d4c4 100644 --- a/generatedocs/generated/documentation.go +++ b/generatedocs/generated/documentation.go @@ -326,7 +326,7 @@ var ( "randomaction.actions.weight": {"The probabilistic weight of the action, specified as an integer. This number is proportional to the likelihood of the specified action, and is used as a weight in a uniform random selection."}, "randomaction.iterations": {"Number of random actions to perform."}, "randomaction.thinktimesettings": {"Settings for the `thinktime` action, which is automatically inserted after every randomized action."}, - "reconnectsettings.backoff": {"Re-connection backoff scheme. Defaults to `[0.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0]`, if left empty. An example backoff scheme could be `[0.0, 1.0, 10.0, 20.0]`:", "`0.0`: If the WebSocket is disconnected, wait 0.0s before attempting to re-connect", "`1.0`: If the previous attempt to re-connect failed, wait 1.0s before attempting again", "`10.0`: If the previous attempt to re-connect failed, wait 10.0s before attempting again", "`20.0`: If the previous attempt to re-connect failed, wait 20.0s before attempting again"}, + "reconnectsettings.backoff": {"Re-connection backoff scheme. Defaults to `[0.0, 2.0, 2.0, 2.0, 2.0, 2.0, 4.0, 4.0, 8.0, 12.0, 16.0]`, if left empty. An example backoff scheme could be `[0.0, 1.0, 10.0, 20.0]`:", "`0.0`: If the WebSocket is disconnected, wait 0.0s before attempting to re-connect", "`1.0`: If the previous attempt to re-connect failed, wait 1.0s before attempting again", "`10.0`: If the previous attempt to re-connect failed, wait 10.0s before attempting again", "`20.0`: If the previous attempt to re-connect failed, wait 20.0s before attempting again"}, "reconnectsettings.reconnect": {"Enable re-connection attempts if the WebSocket is disconnected. Defaults to `false`."}, "reload.log": {"Save the reload log as a field in the output (`true` / `false`). Defaults to `false`, if omitted. **Note:** This should only be used when needed as the reload log can become very large."}, "reload.mode": {"Error handling during the reload operation", "`default`: Use the default error handling.", "`abend`: Stop reloading the script, if an error occurs.", "`ignore`: Continue reloading the script even if an error is detected in the script."}, diff --git a/wsdialer/wsdialer.go b/wsdialer/wsdialer.go index 0b00bb16..fc344eeb 100644 --- a/wsdialer/wsdialer.go +++ b/wsdialer/wsdialer.go @@ -75,7 +75,7 @@ const ( var ( // DefaultBackoff of reconnection - DefaultBackoff = []float64{0.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0, 2.0} + DefaultBackoff = []float64{0.0, 2.0, 2.0, 2.0, 2.0, 2.0, 4.0, 4.0, 8.0, 12.0, 16.0} closedChan = make(chan struct{}) // reusable closed channel )