public synchronized void end(ShellResponse response) { // It may have been cancelled concurrently if (client.current == this) { // Flush what we have in buffer first flush(); // Send end message try { client.current = null; client.out.writeObject(new ServerMessage.End(response)); client.out.flush(); } catch (IOException ignore) { // } finally { closed = true; if (response instanceof ShellResponse.Close) { client.close(); } } } } }
public synchronized void end(ShellResponse response) { // It may have been cancelled concurrently if (client.current == this) { // Flush what we have in buffer first flush(); // Send end message try { client.current = null; client.out.writeObject(new ServerMessage.End(response)); client.out.flush(); } catch (IOException ignore) { // } finally { closed = true; if (response instanceof ShellResponse.Close) { client.close(); } } } } }
public synchronized void end(ShellResponse response) { // It may have been cancelled concurrently if (client.current == this) { // Flush what we have in buffer first flush(); // Send end message try { client.current = null; client.out.writeObject(new ServerMessage.End(response)); client.out.flush(); } catch (IOException ignore) { // } finally { closed = true; if (response instanceof ShellResponse.Close) { client.close(); } } } } }
public synchronized void end(ShellResponse response) { // It may have been cancelled concurrently if (client.current == this) { // Flush what we have in buffer first flush(); // Send end message try { client.current = null; client.out.writeObject(new ServerMessage.End(response)); client.out.flush(); } catch (IOException ignore) { // } finally { closed = true; if (response instanceof ShellResponse.Close) { client.close(); } } } } }