diff options
author | dequis <dx@dxzone.com.ar> | 2016-06-02 21:04:50 -0300 |
---|---|---|
committer | dequis <dx@dxzone.com.ar> | 2016-06-02 21:04:50 -0300 |
commit | e094e5ac91f61d526cc12c0fc01709968c7a5d20 (patch) | |
tree | 385e85dc4afc274f8fa08436aa82235203200fca /facebook/facebook.c | |
parent | 4efa3977cdaa714738dd01c8f33c459a3a2b89d0 (diff) | |
download | bitlbee-facebook-e094e5ac91f61d526cc12c0fc01709968c7a5d20.tar.gz bitlbee-facebook-e094e5ac91f61d526cc12c0fc01709968c7a5d20.tar.bz2 bitlbee-facebook-e094e5ac91f61d526cc12c0fc01709968c7a5d20.tar.xz |
Prevent disconnections on 509 errors, "Invalid attachment id"
I'm still not sure about the origin of these errors (I suspect it's a
race condition between servers), but it's going to be fixed properly in
the future when the sync protocol is updated and doing HTTP requests to
get the attachment URL is no longer required (newer orca versions only
do HTTP requests to get the url of file attachments, everything else is
included in the MQTT stream)
Diffstat (limited to 'facebook/facebook.c')
-rw-r--r-- | facebook/facebook.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/facebook/facebook.c b/facebook/facebook.c index 8c16eb0..da06d89 100644 --- a/facebook/facebook.c +++ b/facebook/facebook.c @@ -294,7 +294,10 @@ fb_cb_api_error(FbApi *api, GError *error, gpointer data) ic = fb_data_get_connection(fata); fb_util_debug_error("%s", error->message); imcb_error(ic, "%s", error->message); - imc_logout(ic, recon); + + if (!g_error_matches(error, FB_API_ERROR, FB_API_ERROR_NONFATAL)) { + imc_logout(ic, recon); + } } static void |