[NO ISSUE][NET] Catch All Network Unexpected Exceptions

- user model changes: no
- storage format changes: no
- interface changes: no

Details:
- Any case of any unexpected exception during
  IPC network operations, close the connection
  to allow it to be reestablished.

Change-Id: I57db83faa1d1ecbc4702ca06e64e21fedb186313
Reviewed-on: https://asterix-gerrit.ics.uci.edu/3132
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Michael Blow <mblow@apache.org>
diff --git a/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/impl/IPCConnectionManager.java b/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/impl/IPCConnectionManager.java
index 9ef506e..b4828e9 100644
--- a/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/impl/IPCConnectionManager.java
+++ b/hyracks-fullstack/hyracks/hyracks-ipc/src/main/java/org/apache/hyracks/ipc/impl/IPCConnectionManager.java
@@ -232,7 +232,7 @@
                     connectableKey.interestOps(SelectionKey.OP_READ);
                     connectionEstablished(handle);
                 }
-            } catch (IOException e) {
+            } catch (Exception e) {
                 LOGGER.warn("Exception finishing connect", e);
             } finally {
                 if (!connected) {
@@ -253,7 +253,7 @@
                 handle.setKey(channelKey);
                 channelKey.attach(handle);
                 handle.setState(HandleState.CONNECT_RECEIVED);
-            } catch (IOException e) {
+            } catch (Exception e) {
                 LOGGER.error("Failed to accept channel ", e);
                 close(channelKey, channel);
             }
@@ -274,7 +274,7 @@
                     }
                     handle.setKey(channelKey);
                     channelKey.attach(handle);
-                } catch (IOException e) {
+                } catch (Exception e) {
                     LOGGER.error("Failed to accept channel ", e);
                     close(channelKey, channel);
                     handle.setState(HandleState.CLOSED);
@@ -377,7 +377,7 @@
                 if (!readBuffer.hasRemaining()) {
                     handle.resizeInBuffer();
                 }
-            } catch (IOException e) {
+            } catch (Exception e) {
                 LOGGER.error("TCP read error from {}", handle.getRemoteAddress(), e);
                 close(readableKey, channel);
             }
@@ -401,7 +401,7 @@
                     handle.clearFull();
                     selector.wakeup();
                 }
-            } catch (IOException e) {
+            } catch (Exception e) {
                 LOGGER.error("TCP write error to {}", handle.getRemoteAddress(), e);
                 close(writableKey, channel);
             }