From e7354499ad7e3ca364f96a51355409488cb25015 Mon Sep 17 00:00:00 2001 From: Laurent Clouet Date: Sat, 18 Mar 2017 17:05:54 +0100 Subject: [PATCH] Bugfix: handle crash of client when the file to upload is too big. (A better fix should fix use of DataOutputStream to not store the all file in ram) --- src/com/sheepit/client/Server.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/com/sheepit/client/Server.java b/src/com/sheepit/client/Server.java index 59ef98a..59b8114 100644 --- a/src/com/sheepit/client/Server.java +++ b/src/com/sheepit/client/Server.java @@ -705,6 +705,10 @@ public class Server extends Thread implements HostnameVerifier, X509TrustManager this.log.error("Server::HTTPSendFile, exception Exception " + e6); return ServerCode.UNKNOWN; } + catch (OutOfMemoryError e6) { + this.log.error("Server::HTTPSendFile, exception Exception " + e6); + return ServerCode.JOB_VALIDATION_ERROR_UPLOAD_FAILED; + } int r; try {