From e1fc6893b4e0df844a72dffb015148628053595f Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Sat, 5 Apr 2014 12:18:14 +0000
Subject: [PATCH] SocketErrorListener callback is unimplemented

---
 .../java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java         | 6 ++++--
 .../java/src/net/i2p/client/streaming/I2PSocket.java        | 5 +++++
 .../src/net/i2p/client/streaming/impl/I2PSocketFull.java    | 3 +++
 3 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java
index 66351f7493..c9ca5d80ee 100644
--- a/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java
+++ b/apps/i2ptunnel/java/src/net/i2p/i2ptunnel/I2PTunnelRunner.java
@@ -145,7 +145,8 @@ public class I2PTunnelRunner extends I2PAppThread implements I2PSocket.SocketErr
         try {
             InputStream in = getSocketIn();
             OutputStream out = getSocketOut(); // = new BufferedOutputStream(s.getOutputStream(), NETWORK_BUFFER_SIZE);
-            i2ps.setSocketErrorListener(this);
+            // unimplemented in streaming
+            //i2ps.setSocketErrorListener(this);
             InputStream i2pin = i2ps.getInputStream();
             OutputStream i2pout = i2ps.getOutputStream(); //new BufferedOutputStream(i2ps.getOutputStream(), MAX_PACKET_SIZE);
             if (initialI2PData != null) {
@@ -246,7 +247,8 @@ public class I2PTunnelRunner extends I2PAppThread implements I2PSocket.SocketErr
                     if (_log.shouldLog(Log.WARN))
                         _log.warn("Could not close I2PSocket", ex);
                 }
-                i2ps.setSocketErrorListener(null);
+                // unimplemented in streaming
+                //i2ps.setSocketErrorListener(null);
             }
         }
     }
diff --git a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocket.java b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocket.java
index f8924d15d2..3ddcb95333 100644
--- a/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocket.java
+++ b/apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocket.java
@@ -76,6 +76,9 @@ public interface I2PSocket extends Closeable {
 
     public boolean isClosed();
 
+    /**
+     *  Deprecated, unimplemented, does nothing
+     */
     public void setSocketErrorListener(SocketErrorListener lsnr);
 
     /**
@@ -93,6 +96,8 @@ public interface I2PSocket extends Closeable {
     public int getLocalPort();
 
     /**
+     * Deprecated, unimplemented, does nothing. Original description:
+     *
      * Allow notification of underlying errors communicating across I2P without
      * waiting for any sort of cleanup process.  For example, if some data could
      * not be sent, this listener is notified immediately, and while the input/output
diff --git a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketFull.java b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketFull.java
index cda4deedba..6e59ab1bb0 100644
--- a/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketFull.java
+++ b/apps/streaming/java/src/net/i2p/client/streaming/impl/I2PSocketFull.java
@@ -139,6 +139,9 @@ class I2PSocketFull implements I2PSocket {
         c.getOptions().setReadTimeout(ms);
     }
     
+    /**
+     *  Deprecated, unimplemented, does nothing
+     */
     public void setSocketErrorListener(I2PSocket.SocketErrorListener lsnr) {
     }
     
-- 
GitLab