]> iEval git - fonbot.git/blobdiff - src/ro/ieval/fonbot/PollResultCallback.java
Make FonBot usable
[fonbot.git] / src / ro / ieval / fonbot / PollResultCallback.java
index 370ec11d9b8582fcc9bca6696f846caf11d035c4..19da5bbabbdbb321177d15c2647501fdc11f251f 100644 (file)
@@ -55,8 +55,11 @@ 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 != 200 || inputStream==null){
+                       if(responseCode != 204 && responseCode != 504)
+                               throw new RuntimeException("Bad HTTP response code: "+responseCode);
                        return;
+               }
 
                final Handler handler=new Handler(Looper.getMainLooper());
 
@@ -98,7 +101,7 @@ final class PollResultCallback implements ResultCallback {
 
        @Override
        public void onError(final String error) {
-               Log.e("PollResultCallback", "onError: "+error);
+               //error handling is done by the LongPollRunnable thread
        }
 
 }
This page took 0.024757 seconds and 4 git commands to generate.