diff options
author | iNPUTmice <daniel@gultsch.de> | 2014-11-15 14:52:51 +0100 |
---|---|---|
committer | iNPUTmice <daniel@gultsch.de> | 2014-11-15 15:34:12 +0100 |
commit | ca2d86cf87ca3eaab5631c2ad3f18cec66a7d86b (patch) | |
tree | fc4150d13725ce2934fae570045dcbf349df0b8f /src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java | |
parent | 47d44448f3c2e4527b23fcabc4ee65269094eda1 (diff) |
better cleanup after unsuccesful transfers
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java')
-rw-r--r-- | src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java index 982fa9647..04b225d0e 100644 --- a/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java +++ b/src/main/java/eu/siacs/conversations/xmpp/jingle/JingleInbandTransport.java @@ -34,7 +34,7 @@ public class JingleInbandTransport extends JingleTransport { private JingleConnection connection; private InputStream fileInputStream = null; - private OutputStream fileOutputStream; + private OutputStream fileOutputStream = null; private long remainingSize = 0; private long fileSize = 0; private MessageDigest digest; @@ -129,6 +129,20 @@ public class JingleInbandTransport extends JingleTransport { @Override public void disconnect() { this.connected = false; + if (this.fileOutputStream != null) { + try { + this.fileOutputStream.close(); + } catch (IOException e) { + + } + } + if (this.fileInputStream != null) { + try { + this.fileInputStream.close(); + } catch (IOException e) { + + } + } } private void sendNextBlock() { |