log all fail reasons

Daniel Gultsch created

Change summary

src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java | 11 
1 file changed, 6 insertions(+), 5 deletions(-)

Detailed changes

src/main/java/eu/siacs/conversations/http/HttpUploadConnection.java 🔗

@@ -110,6 +110,7 @@ public class HttpUploadConnection implements Transferable {
 		try {
 			pair = AbstractConnectionManager.createInputStream(file, true);
 		} catch (FileNotFoundException e) {
+			Log.d(Config.LOGTAG,account.getJid().toBareJid()+": could not find file to upload - "+e.getMessage());
 			fail();
 			return;
 		}
@@ -129,15 +130,14 @@ public class HttpUploadConnection implements Transferable {
 							if (!canceled) {
 								new Thread(new FileUploader()).start();
 							}
+							return;
 						} catch (MalformedURLException e) {
-							fail();
+							//fall through
 						}
-					} else {
-						fail();
 					}
-				} else {
-					fail();
 				}
+				Log.d(Config.LOGTAG,account.getJid().toString()+": invalid response to slot request "+packet);
+				fail();
 			}
 		});
 		message.setTransferable(this);
@@ -203,6 +203,7 @@ public class HttpUploadConnection implements Transferable {
 
 							@Override
 							public void error(int errorCode, Message object) {
+								Log.d(Config.LOGTAG,"pgp encryption failed");
 								fail();
 							}