From 93fd0ca258240b00cc468a9bed03d3a77f5dcaa5 Mon Sep 17 00:00:00 2001
From: brutzman <brutzman@nps.edu>
Date: Wed, 11 Aug 2021 11:58:04 -0700
Subject: [PATCH] explicitly catch InterruptedException

---
 examples/src/TcpExamples/TcpExample3Client.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/examples/src/TcpExamples/TcpExample3Client.java b/examples/src/TcpExamples/TcpExample3Client.java
index 64113b2e71..30ea9e36bb 100644
--- a/examples/src/TcpExamples/TcpExample3Client.java
+++ b/examples/src/TcpExamples/TcpExample3Client.java
@@ -26,8 +26,8 @@ public class TcpExample3Client {
      * Program invocation, execution starts here
      * @param args command-line arguments
      */
-    public static void main(String[] args) throws InterruptedException {
-        
+    public static void main(String[] args)
+    {        
         // Local variables/fields
         Socket socket = null;
         InputStream is;
@@ -69,7 +69,7 @@ public class TcpExample3Client {
                 
             } // end while(true) // infinite loops are dangerous, be sure to kill this process!
         } 
-        catch (IOException e)
+        catch (IOException | InterruptedException e )
         {
             System.err.println("Problem with " + TcpExample3Client.class.getName() + " networking:"); // describe what is happening
             System.err.println("Error: " + e);
-- 
GitLab