@azure/core-amqp
Advanced tools
Comparing version 1.0.0-dev.20191210.1 to 1.0.0-dev.20191211.1
@@ -0,4 +1,9 @@ | ||
## 1.0.0-preview.7 - TBD | ||
- Improved detection of when an established socket is no longer receiving data from the service. | ||
- Added logging around the network connectivity check. | ||
## 1.0.0-preview.6 - 3rd December, 2019 | ||
* Treat ETIMEOUT error from dns.resolve as network disconnected. | ||
- Treat ETIMEOUT error from dns.resolve as network disconnected. | ||
@@ -5,0 +10,0 @@ ## 1.0.0-preview.5 - 29th October, 2019 |
@@ -41,2 +41,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
}, | ||
idle_time_out: Constants.defaultConnectionIdleTimeoutInMs, | ||
operationTimeoutInSeconds: parameters.operationTimeoutInMs | ||
@@ -43,0 +44,0 @@ ? parameters.operationTimeoutInMs / 1000 |
@@ -5,6 +5,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
import { translate } from "./errors"; | ||
import { delay, isNode } from "./util/utils"; | ||
import { delay } from "./util/utils"; | ||
import * as log from "./log"; | ||
import { defaultMaxRetries, defaultDelayBetweenOperationRetriesInMs, defaultMaxDelayForExponentialRetryInMs } from "./util/constants"; | ||
import { resolve } from "dns"; | ||
import { checkNetworkConnection } from "./util/checkNetworkConnection"; | ||
/** | ||
@@ -64,22 +64,2 @@ * Determines whether the object is a Delivery object. | ||
} | ||
function checkNetworkConnection(host) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (isNode) { | ||
return new Promise((res) => { | ||
resolve(host, function (err) { | ||
// List of possible DNS error codes: https://nodejs.org/dist/latest-v12.x/docs/api/dns.html#dns_error_codes | ||
if (err && (err.code === "ECONNREFUSED" || err.code === "ETIMEOUT")) { | ||
res(false); | ||
} | ||
else { | ||
res(true); | ||
} | ||
}); | ||
}); | ||
} | ||
else { | ||
return window.navigator.onLine; | ||
} | ||
}); | ||
} | ||
/** | ||
@@ -86,0 +66,0 @@ * Every operation is attempted at least once. Additional attempts are made if the previous attempt failed |
@@ -53,2 +53,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
export const defaultOperationTimeoutInMs = 60000; | ||
export const defaultConnectionIdleTimeoutInMs = 60000; | ||
export const managementRequestKey = "managementRequest"; | ||
@@ -55,0 +56,0 @@ export const negotiateCbsKey = "negotiateCbs"; |
{ | ||
"name": "@azure/core-amqp", | ||
"sdk-type": "client", | ||
"version": "1.0.0-dev.20191210.1", | ||
"version": "1.0.0-dev.20191211.1", | ||
"description": "Common library for amqp based azure sdks like @azure/event-hubs.", | ||
@@ -12,2 +12,3 @@ "author": "Microsoft Corporation", | ||
"browser": { | ||
"./dist-esm/src/util/checkNetworkConnection.js": "./dist-esm/src/util/checkNetworkConnection.browser.js", | ||
"./dist/index.js": "./browser/index.js", | ||
@@ -70,2 +71,4 @@ "buffer": "buffer", | ||
"process": "^0.11.10", | ||
"rhea": "^1.0.15", | ||
"rhea-promise": "^1.0.0", | ||
"stream-browserify": "^2.0.2", | ||
@@ -76,5 +79,2 @@ "tslib": "^1.9.3", | ||
}, | ||
"peerDependencies": { | ||
"rhea-promise": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
@@ -113,4 +113,2 @@ "@azure/eslint-plugin-azure-sdk": "^2.0.1", | ||
"puppeteer": "^2.0.0", | ||
"rhea": "^1.0.4", | ||
"rhea-promise": "^1.0.0", | ||
"rimraf": "^3.0.0", | ||
@@ -117,0 +115,0 @@ "rollup": "^1.16.3", |
@@ -233,3 +233,3 @@ # Azure Core AMQP client library for AMQP operations | ||
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/tree/1ff3be664b7342f8d70e93709a93ca9fa245edc8/CONTRIBUTING.md) to learn more about how to build and test the code. | ||
If you'd like to contribute to this library, please read the [contributing guide](https://github.com/Azure/azure-sdk-for-js/tree/887e83af9625be3d4c092e5704d485395598a08a/CONTRIBUTING.md) to learn more about how to build and test the code. | ||
@@ -236,0 +236,0 @@ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). |
@@ -159,2 +159,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
}, | ||
idle_time_out: Constants.defaultConnectionIdleTimeoutInMs, | ||
operationTimeoutInSeconds: parameters.operationTimeoutInMs | ||
@@ -161,0 +162,0 @@ ? parameters.operationTimeoutInMs / 1000 |
@@ -5,3 +5,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
import { translate, MessagingError } from "./errors"; | ||
import { delay, isNode } from "./util/utils"; | ||
import { delay } from "./util/utils"; | ||
import * as log from "./log"; | ||
@@ -13,4 +13,4 @@ import { | ||
} from "./util/constants"; | ||
import { resolve } from "dns"; | ||
import { AbortSignalLike } from "@azure/abort-controller"; | ||
import { checkNetworkConnection } from "./util/checkNetworkConnection"; | ||
@@ -144,19 +144,2 @@ /** | ||
async function checkNetworkConnection(host: string): Promise<boolean> { | ||
if (isNode) { | ||
return new Promise((res) => { | ||
resolve(host, function(err: any): void { | ||
// List of possible DNS error codes: https://nodejs.org/dist/latest-v12.x/docs/api/dns.html#dns_error_codes | ||
if (err && (err.code === "ECONNREFUSED" || err.code === "ETIMEOUT")) { | ||
res(false); | ||
} else { | ||
res(true); | ||
} | ||
}); | ||
}); | ||
} else { | ||
return window.navigator.onLine; | ||
} | ||
} | ||
/** | ||
@@ -163,0 +146,0 @@ * Every operation is attempted at least once. Additional attempts are made if the previous attempt failed |
@@ -54,2 +54,3 @@ // Copyright (c) Microsoft Corporation. All rights reserved. | ||
export const defaultOperationTimeoutInMs = 60000; | ||
export const defaultConnectionIdleTimeoutInMs = 60000; | ||
export const managementRequestKey = "managementRequest"; | ||
@@ -56,0 +57,0 @@ export const negotiateCbsKey = "negotiateCbs"; |
@@ -51,2 +51,3 @@ export declare const associatedLinkName = "associated-link-name"; | ||
export declare const defaultOperationTimeoutInMs = 60000; | ||
export declare const defaultConnectionIdleTimeoutInMs = 60000; | ||
export declare const managementRequestKey = "managementRequest"; | ||
@@ -53,0 +54,0 @@ export declare const negotiateCbsKey = "negotiateCbs"; |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2251246
46
111
22668
17
+ Addedrhea@^1.0.15
+ Addedrhea-promise@^1.0.0