aboutsummaryrefslogtreecommitdiffstats
path: root/facebook/facebook-mqtt.c
diff options
context:
space:
mode:
authorjgeboski <jgeboski@gmail.com>2015-01-23 00:52:37 -0500
committerjgeboski <jgeboski@gmail.com>2015-01-23 01:48:30 -0500
commit0b9d4d77b2544963831838cbe73394683f6e341b (patch)
tree5c991440a92af64b3e973f0cbc34d6c6bf3012bf /facebook/facebook-mqtt.c
parent3ec4eca3a75255de6ee36793d665d5b0e0ff5d7e (diff)
downloadbitlbee-facebook-0b9d4d77b2544963831838cbe73394683f6e341b.tar.gz
bitlbee-facebook-0b9d4d77b2544963831838cbe73394683f6e341b.tar.bz2
bitlbee-facebook-0b9d4d77b2544963831838cbe73394683f6e341b.tar.xz
facebook-mqtt: reset the connected state upon closing
The connected state should be reset when the connection is closed. This was an oversight when implementing the original MQTT interface.
Diffstat (limited to 'facebook/facebook-mqtt.c')
-rw-r--r--facebook/facebook-mqtt.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/facebook/facebook-mqtt.c b/facebook/facebook-mqtt.c
index 46af995..c8f9b07 100644
--- a/facebook/facebook-mqtt.c
+++ b/facebook/facebook-mqtt.c
@@ -113,7 +113,9 @@ void fb_mqtt_close(fb_mqtt_t *mqtt)
FB_UTIL_DEBUGLN("Closing with unwritten data");
#endif /* DEBUG_FACEBOOK */
+ mqtt->connected = FALSE;
g_clear_error(&mqtt->err);
+
g_byte_array_set_size(mqtt->rbuf, 0);
g_byte_array_set_size(mqtt->wbuf, 0);
}