Make FonBot usable
[fonbot.git] / src / ro / ieval / fonbot / PollResultCallback.java
index 46e3eda83e39cc4ed15455ea0fc64f05f6c4f787..19da5bbabbdbb321177d15c2647501fdc11f251f 100644 (file)
@@ -56,7 +56,7 @@ final class PollResultCallback implements ResultCallback {
        @Override
        public void onResult(final int responseCode, final String responseMessage, final @Nullable InputStream inputStream) {
                if(responseCode != 200 || inputStream==null){
-                       if(responseCode != 204)
+                       if(responseCode != 204 && responseCode != 504)
                                throw new RuntimeException("Bad HTTP response code: "+responseCode);
                        return;
                }
@@ -101,8 +101,7 @@ final class PollResultCallback implements ResultCallback {
 
        @Override
        public void onError(final String error) {
-               Log.e("PollResultCallback", "onError: "+error);
-               throw new RuntimeException(error);
+               //error handling is done by the LongPollRunnable thread
        }
 
 }
This page took 0.010159 seconds and 4 git commands to generate.