close piped streams after use

This commit is contained in:
Vincent Breitmoser 2015-01-29 20:24:59 +01:00
parent 0a07250417
commit 3077e6a2d7
1 changed files with 12 additions and 0 deletions

View File

@ -194,6 +194,12 @@ public class MessageCryptoHelper {
signatureBodyPart.writeTo(out);
} catch (Exception e) {
Log.e(K9.LOG_TAG, "Exception while writing message to crypto provider", e);
} finally {
try {
out.close();
} catch (IOException e) {
// don't care
}
}
}
}).start();
@ -215,6 +221,12 @@ public class MessageCryptoHelper {
encryptionPayloadBody.writeTo(out);
} catch (Exception e) {
Log.e(K9.LOG_TAG, "Exception while writing message to crypto provider", e);
} finally {
try {
out.close();
} catch (IOException e) {
// don't care
}
}
}
}).start();