aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/session.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libsylph/session.c b/libsylph/session.c
index 9e0006d3..433ee539 100644
--- a/libsylph/session.c
+++ b/libsylph/session.c
@@ -265,6 +265,9 @@ static gboolean session_ping_cb(gpointer data)
Session *session = SESSION(data);
SockInfo *sock = session->sock;
+ if (!session_is_connected(session))
+ return FALSE;
+
if (session->io_tag > 0 && sock && sock->callback) {
GTimeVal tv_cur, tv_result;