mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 20:29:52 +01:00
Merge branch '614-dev-reporter-does-not-close-stream' into 'master'
Use Briar's IoUtils.copy(), not H2's IOUtils.copy() Our implementation closes both streams, H2's implementation leaves them open. Closes #614. See merge request !293
This commit is contained in:
@@ -7,8 +7,8 @@ import net.sourceforge.jsocks.socks.SocksSocket;
|
|||||||
import org.briarproject.api.crypto.CryptoComponent;
|
import org.briarproject.api.crypto.CryptoComponent;
|
||||||
import org.briarproject.api.reporting.DevConfig;
|
import org.briarproject.api.reporting.DevConfig;
|
||||||
import org.briarproject.api.reporting.DevReporter;
|
import org.briarproject.api.reporting.DevReporter;
|
||||||
|
import org.briarproject.util.IoUtils;
|
||||||
import org.briarproject.util.StringUtils;
|
import org.briarproject.util.StringUtils;
|
||||||
import org.h2.util.IOUtils;
|
|
||||||
|
|
||||||
import java.io.Closeable;
|
import java.io.Closeable;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -87,7 +87,7 @@ class DevReporterImpl implements DevReporter {
|
|||||||
Socket s = connectToDevelopers(socksPort);
|
Socket s = connectToDevelopers(socksPort);
|
||||||
out = s.getOutputStream();
|
out = s.getOutputStream();
|
||||||
in = new FileInputStream(f);
|
in = new FileInputStream(f);
|
||||||
IOUtils.copy(in, out);
|
IoUtils.copy(in, out);
|
||||||
f.delete();
|
f.delete();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.log(WARNING, "Failed to send reports", e);
|
LOG.log(WARNING, "Failed to send reports", e);
|
||||||
|
|||||||
Reference in New Issue
Block a user