summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--js/src/Ice/OutgoingConnectionFactory.js25
-rw-r--r--js/src/Ice/Reference.js14
-rw-r--r--js/test/Ice/acm/Client.js6
3 files changed, 20 insertions, 25 deletions
diff --git a/js/src/Ice/OutgoingConnectionFactory.js b/js/src/Ice/OutgoingConnectionFactory.js
index 83e58447172..a2688c43076 100644
--- a/js/src/Ice/OutgoingConnectionFactory.js
+++ b/js/src/Ice/OutgoingConnectionFactory.js
@@ -835,6 +835,20 @@ class ConnectCallback
nextEndpoint()
{
+
+ const start = (connection) =>
+ {
+ connection.start().then(
+ () =>
+ {
+ this.connectionStartCompleted(connection);
+ },
+ ex =>
+ {
+ this.connectionStartFailed(connection, ex);
+ });
+ };
+
while(true)
{
const traceLevels = this._factory._instance.traceLevels();
@@ -853,16 +867,7 @@ class ConnectCallback
this._factory._instance.initializationData().logger.trace(traceLevels.networkCat, s.join(""));
}
- const connection = this._factory.createConnection(this._current.connect(), this._current);
- connection.start().then(
- () =>
- {
- this.connectionStartCompleted(connection);
- },
- ex =>
- {
- this.connectionStartFailed(connection, ex);
- });
+ start(this._factory.createConnection(this._current.connect(), this._current));
}
catch(ex)
{
diff --git a/js/src/Ice/Reference.js b/js/src/Ice/Reference.js
index 855417c97a1..f4a33db2d99 100644
--- a/js/src/Ice/Reference.js
+++ b/js/src/Ice/Reference.js
@@ -671,7 +671,7 @@ class ReferenceFactory
checkForUnknownProperties(prefix)
{
- const unknownProps = [];
+ let unknownProps = [];
//
// Do not warn about unknown properties for Ice prefixes (Ice, Glacier2, etc.)
//
@@ -684,16 +684,10 @@ class ReferenceFactory
}
let properties = this._instance.initializationData().properties.getPropertiesForPrefix(prefix + ".");
- for(let key of properties.keys())
- {
- if(!suffixes.some(suffix => key === (prefix + "." + suffix)))
- {
- unknownProps.push(key);
- }
- }
-
+ unknownProps = unknownProps.concat(Array.from(properties.keys()).filter(
+ key => !suffixes.some(suffix => key === prefix + "." + suffix)));
if(unknownProps.length > 0)
- {
+ {
let message = [];
message.push("found unknown properties for proxy '");
message.push(prefix);
diff --git a/js/test/Ice/acm/Client.js b/js/test/Ice/acm/Client.js
index 0095ebeb3cc..1d1d929714e 100644
--- a/js/test/Ice/acm/Client.js
+++ b/js/test/Ice/acm/Client.js
@@ -156,10 +156,7 @@
{
var now = Date.now();
var promise = Ice.Promise.delay(100);
- var p = promise;
- for(var i = 0; i < 20; ++i)
- {
- p = p.then(() => {
+ var p = promise.then(() => {
if(this._closed)
{
return;
@@ -173,7 +170,6 @@
return Ice.Promise.delay(100);
}
});
- }
return p;
}
return Ice.Promise.resolve();