aboutsummaryrefslogtreecommitdiff
path: root/libsylph/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'libsylph/session.c')
-rw-r--r--libsylph/session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libsylph/session.c b/libsylph/session.c
index 1d8bc0d4..01962b11 100644
--- a/libsylph/session.c
+++ b/libsylph/session.c
@@ -127,7 +127,7 @@ gint session_connect(Session *session, const gchar *server, gushort port)
session);
if (session->conn_id < 0) {
g_warning("can't connect to server.");
- session_close(session);
+ session->state = SESSION_ERROR;
return -1;
}
@@ -141,7 +141,7 @@ gint session_connect(Session *session, const gchar *server, gushort port)
sock = sock_connect(server, port);
if (sock == NULL) {
g_warning("can't connect to server.");
- session_close(session);
+ session->state = SESSION_ERROR;
return -1;
}