summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-10-08 08:13:49 (EDT)
committerEike Stepper2007-10-08 08:13:49 (EDT)
commit3f712591aa72eb74d908e2e877a8935af63705fc (patch)
tree10e4c78335bacbbbb6d88a65a57fb61926e91704
parent94ca450fe38c01ad9851444b2d3c6a3e3030d439 (diff)
downloadcdo-3f712591aa72eb74d908e2e877a8935af63705fc.zip
cdo-3f712591aa72eb74d908e2e877a8935af63705fc.tar.gz
cdo-3f712591aa72eb74d908e2e877a8935af63705fc.tar.bz2
[205668] Provide buddies example
https://bugs.eclipse.org/bugs/show_bug.cgi?id=205668
-rw-r--r--plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java11
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java5
2 files changed, 16 insertions, 0 deletions
diff --git a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java
index b96b82c..04f1824 100644
--- a/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java
+++ b/plugins/org.eclipse.net4j.buddies/src/org/eclipse/net4j/internal/buddies/protocol/BuddyAddedIndication.java
@@ -36,7 +36,18 @@ public class BuddyAddedIndication extends Indication
protected void indicating(ExtendedDataInputStream in) throws IOException
{
String buddy = in.readString();
+ // for (int i = 0; i < 5; i++)
+ // {
BuddySession session = (BuddySession)getProtocol().getInfraStructure();
+ // if (session == null)
+ // {
+ // ConcurrencyUtil.sleep(1000);
+ // }
+ // else
+ // {
session.buddyAdded(buddy);
+ // break;
+ // }
+ // }
}
}
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
index ea66700..e58f08a 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPConnector.java
@@ -137,6 +137,11 @@ public abstract class TCPConnector extends Connector implements ITCPConnector, I
return;
}
}
+ catch (java.net.ConnectException ex)
+ {
+ if (TRACER.isEnabled()) TRACER.trace(ex.getMessage());
+ return;
+ }
catch (Exception ex)
{
OM.LOG.error(ex);