/** * Closes the connection simply by closing the socket. */ public void close() { connected = false; if (tConnection != null) { tConnection.close(); } }
/** * Closes the connection simply by closing the socket. */ public void close() { connected = false; if (tConnection != null) { tConnection.close(); } }
/** * Closes the connection simply by closing the socket. */ public void close() { connected = false; if (tConnection != null) { tConnection.close(); } }
} catch (IOException e) { } finally { close();
} catch (IOException e) { } finally { close();
} catch (IOException e) { } finally { close();
@Override public void run() { TConnection tConnection; try { tConnection = new TConnection(socket, maxTPduSizeParam, messageTimeout, messageFragmentTimeout, serverThread); } catch (IOException e) { logger.warn("Exception occured when someone tried to connect.", e); synchronized (ServerThread.this) { numConnections--; } return; } try { tConnection.listenForCR(); } catch (IOException e) { logger.warn( "Exception occured when someone tried to connect. Server was listening for ISO Transport CR packet.", e); tConnection.close(); return; } connectionListener.connectionIndication(tConnection); } }
@Override public void run() { TConnection tConnection; try { tConnection = new TConnection(socket, maxTPduSizeParam, messageTimeout, messageFragmentTimeout, serverThread); } catch (IOException e) { synchronized (ServerThread.this) { numConnections--; } return; } try { tConnection.listenForCR(); } catch (IOException e) { tConnection.close(); return; } connectionListener.connectionIndication(tConnection); } }
@Override public void run() { TConnection tConnection; try { tConnection = new TConnection(socket, maxTPduSizeParam, messageTimeout, messageFragmentTimeout, serverThread); } catch (IOException e) { synchronized (ServerThread.this) { numConnections--; } return; } try { tConnection.listenForCR(); } catch (IOException e) { tConnection.close(); return; } connectionListener.connectionIndication(tConnection); } }