diff options
author | Christian Schneider | 2015-03-18 09:04:53 +0000 |
---|---|---|
committer | Christian Schneider | 2015-04-01 09:59:12 +0000 |
commit | f130a7a596c2bc3c95c2068649da575ff14c93d8 (patch) | |
tree | 19df9745a20c2b7f266d2816137ce69f980a2445 | |
parent | 3b83c56d53a46c107b4cf2e263ddb705866620bf (diff) | |
download | rt.equinox.p2-f130a7a596c2bc3c95c2068649da575ff14c93d8.tar.gz rt.equinox.p2-f130a7a596c2bc3c95c2068649da575ff14c93d8.tar.xz rt.equinox.p2-f130a7a596c2bc3c95c2068649da575ff14c93d8.zip |
Bug 409709 - use loopback device when opening a port for uniqueness to
avoid Windows Firewall Popup; use 127.0.0.1 for Java 1.5 compatibility
Change-Id: I07b5fc89b1f7a7bb49d2f1c2e8f2b8382a55653d
Signed-off-by: Christian Schneider <schneider@yatta.de>
-rw-r--r-- | bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java index 0d3204027..6f1e7c142 100644 --- a/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java +++ b/bundles/org.eclipse.equinox.p2.touchpoint.natives/src/org/eclipse/equinox/internal/p2/touchpoint/natives/BackupStore.java @@ -744,7 +744,9 @@ public class BackupStore implements IBackupStore { } int port = 0; try { - socket = new ServerSocket(0); + // TODO: this should be replaced by InetAddress.getLoopbackAddress() when 1.7 compatibility is OK + // on a system where solely IPv6 is available this address resolution will fail: + socket = new ServerSocket(0, 1, InetAddress.getByName("127.0.0.1")); //$NON-NLS-1$ port = socket.getLocalPort(); } catch (IOException e) { try { |