|
|
|
@ -282,8 +282,10 @@ abstract class BasePackConnection extends BaseConnection {
|
|
|
|
|
public void close() { |
|
|
|
|
if (out != null) { |
|
|
|
|
try { |
|
|
|
|
if (outNeedsEnd) |
|
|
|
|
if (outNeedsEnd) { |
|
|
|
|
outNeedsEnd = false; |
|
|
|
|
pckOut.end(); |
|
|
|
|
} |
|
|
|
|
out.close(); |
|
|
|
|
} catch (IOException err) { |
|
|
|
|
// Ignore any close errors.
|
|
|
|
@ -314,4 +316,23 @@ abstract class BasePackConnection extends BaseConnection {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** Tell the peer we are disconnecting, if it cares to know. */ |
|
|
|
|
protected void endOut() { |
|
|
|
|
if (outNeedsEnd && out != null) { |
|
|
|
|
try { |
|
|
|
|
outNeedsEnd = false; |
|
|
|
|
pckOut.end(); |
|
|
|
|
} catch (IOException e) { |
|
|
|
|
try { |
|
|
|
|
out.close(); |
|
|
|
|
} catch (IOException err) { |
|
|
|
|
// Ignore any close errors.
|
|
|
|
|
} finally { |
|
|
|
|
out = null; |
|
|
|
|
pckOut = null; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|