Ignore:
Timestamp:
09/12/2022 04:20:14 PM (4 years ago)
Author:
jdalbey
Message:

!CADClientConnector.java Catch socketexception to drop clients that have disconnected. Hope this fixes #160.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tmcsim/cadsimulator/CADClientConnector.java

    r123 r660  
    55import java.io.ObjectOutputStream; 
    66import java.net.Socket; 
     7import java.net.SocketException; 
    78import java.util.Observable; 
    89import java.util.Observer; 
     
    106107        catch (ClassNotFoundException cnfe) { 
    107108            cnfe.printStackTrace(); 
     109        } 
     110        catch (SocketException except) 
     111        { 
     112            if (except.getMessage().endsWith("reset")) 
     113            { 
     114                cadLogger.logp(Level.INFO, "CADClientConnector", "run", "Connection reset, removing client.\n"); 
     115                disconnectClient(); 
     116            } 
    108117        } 
    109118        catch (IOException ioe) {                    
Note: See TracChangeset for help on using the changeset viewer.