summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2015-07-20 19:41:28 +0200
committerJose <jose@zeroc.com>2015-07-20 19:41:28 +0200
commit43c41e6bd2135089f273272ef707eac48dd074ff (patch)
tree6a99e4ae59ab1c0e909e9420e5fc3d832918b34c /js
parentICE-6316 confirm abort of icepatch2client (diff)
downloadice-43c41e6bd2135089f273272ef707eac48dd074ff.tar.bz2
ice-43c41e6bd2135089f273272ef707eac48dd074ff.tar.xz
ice-43c41e6bd2135089f273272ef707eac48dd074ff.zip
Fix issue with JavaScript brwoser mapping when proxy contains TCP endpoints
Diffstat (limited to 'js')
-rw-r--r--js/src/Ice/TcpEndpointI.js6
-rw-r--r--js/test/Ice/proxy/Client.js13
2 files changed, 18 insertions, 1 deletions
diff --git a/js/src/Ice/TcpEndpointI.js b/js/src/Ice/TcpEndpointI.js
index c40d70a44d6..f344b9212a5 100644
--- a/js/src/Ice/TcpEndpointI.js
+++ b/js/src/Ice/TcpEndpointI.js
@@ -118,7 +118,11 @@ var TcpEndpointI = Class(Ice.IPEndpointI, {
},
connectable: function()
{
- return !this.secure(); // We don't support SSL, we can only connect with plain TCP
+ //
+ // TCP endpoints are not connectable when running in a browser, SSL
+ // isn't currently supported.
+ //
+ return TcpTransceiver !== null && !this.secure();
},
connect: function()
{
diff --git a/js/test/Ice/proxy/Client.js b/js/test/Ice/proxy/Client.js
index d31c1f9b1b1..9bb381e7e30 100644
--- a/js/test/Ice/proxy/Client.js
+++ b/js/test/Ice/proxy/Client.js
@@ -1054,6 +1054,19 @@
).then(
function()
{
+ if(typeof window !== 'undefined')
+ {
+ //
+ // Ensure that TCP endpoints are skipped when runing in a browser.
+ //
+ var p = communicator.stringToProxy("test:tcp -p 12010:ws -p 12010");
+ p = p.ice_endpointSelection(Ice.EndpointSelectionType.Ordered);
+ return p.ice_ping();
+ }
+ }
+ ).then(
+ function()
+ {
out.writeLine("ok");
var derived = Test.MyDerivedClassPrx.uncheckedCast(communicator.stringToProxy("test:default -p 12010"));
return derived.shutdown();