@Override public void run() { try { ObjectInputStream in = new ObjectInputStream(socket.getInputStream()); while (!closed) { Message msg = (Message) in.readObject(); handle(msg); } } catch (EOFException eof) { // Remote side has closed the connection, just cleanup. try { close(); } catch (Exception unused) { // no-op. } } catch (Exception e) { if (!closed) { LOG.log(Level.WARNING, "Error in inbound message handling.", e); try { close(); } catch (Exception unused) { // no-op. } } } }
@Override public void run() { try { FilteredObjectInputStream in = new FilteredObjectInputStream(socket.getInputStream()); while (!closed) { Message msg = (Message) in.readObject(); handle(msg); } } catch (EOFException eof) { // Remote side has closed the connection, just cleanup. try { close(); } catch (Exception unused) { // no-op. } } catch (Exception e) { if (!closed) { LOG.log(Level.WARNING, "Error in inbound message handling.", e); try { close(); } catch (Exception unused) { // no-op. } } } }
@Override public void run() { try { FilteredObjectInputStream in = new FilteredObjectInputStream(socket.getInputStream()); while (isOpen()) { Message msg = (Message) in.readObject(); handle(msg); } } catch (EOFException eof) { // Remote side has closed the connection, just cleanup. try { close(); } catch (Exception unused) { // no-op. } } catch (Exception e) { if (!closed) { LOG.log(Level.WARNING, "Error in inbound message handling.", e); try { close(); } catch (Exception unused) { // no-op. } } } }
@Override public void run() { try { FilteredObjectInputStream in = new FilteredObjectInputStream(socket.getInputStream()); while (isOpen()) { Message msg = (Message) in.readObject(); handle(msg); } } catch (EOFException eof) { // Remote side has closed the connection, just cleanup. try { close(); } catch (Exception unused) { // no-op. } } catch (Exception e) { if (!closed) { LOG.log(Level.WARNING, "Error in inbound message handling.", e); try { close(); } catch (Exception unused) { // no-op. } } } }