Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
prepare 5.12.0 release (#181)
Browse files Browse the repository at this point in the history
  • Loading branch information
LaunchDarklyCI authored Apr 3, 2020
1 parent c7cfae7 commit 1ab58a1
Show file tree
Hide file tree
Showing 9 changed files with 1,755 additions and 1,180 deletions.
1 change: 1 addition & 0 deletions configuration.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = (function() {
streamUri: 'https://stream.launchdarkly.com',
eventsUri: 'https://events.launchdarkly.com',
stream: true,
streamInitialReconnectDelayMillis: 1000,
sendEvents: true,
timeout: 5,
capacity: 10000,
Expand Down
336 changes: 0 additions & 336 deletions eventsource.js

This file was deleted.

11 changes: 11 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,17 @@ declare module 'launchdarkly-node-server-sdk' {
*/
stream?: boolean;

/**
* Sets the initial reconnect delay for the streaming connection, in milliseconds.
*
* The streaming service uses a backoff algorithm (with jitter) every time the connection needs
* to be reestablished. The delay for the first reconnection will start near this value, and then
* increase exponentially for any subsequent connection failures.
*
* The default value is 1000.
*/
streamInitialReconnectDelayMillis?: number;

/**
* Whether you are using the LaunchDarkly relay proxy in daemon mode.
*
Expand Down
18 changes: 10 additions & 8 deletions messages.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ const errors = require('./errors');

exports.deprecated = (oldName, newName) => '"' + oldName + '" is deprecated, please use "' + newName + '"';

exports.httpErrorMessage = (status, context, retryMessage) =>
'Received error ' +
status +
(status === 401 ? ' (invalid SDK key)' : '') +
' for ' +
context +
' - ' +
(errors.isHttpErrorRecoverable(status) ? retryMessage : 'giving up permanently');
exports.httpErrorMessage = (status, context, retryMessage) => {
let desc;
if (status) {
desc = 'error ' + status + (status === 401 ? ' (invalid SDK key)' : '');
} else {
desc = 'I/O error';
}
const action = errors.isHttpErrorRecoverable(status) ? retryMessage : 'giving up permanently';
return 'Received ' + desc + ' for ' + context + ' - ' + action;
};

exports.missingUserKeyNoEvent = () => 'User was unspecified or had no key; event will not be sent';

Expand Down
Loading

0 comments on commit 1ab58a1

Please sign in to comment.