summaryrefslogtreecommitdiff
path: root/lib/conn.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/conn.c')
-rw-r--r--lib/conn.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/conn.c b/lib/conn.c
index 7d0a794..fa63727 100644
--- a/lib/conn.c
+++ b/lib/conn.c
@@ -224,7 +224,7 @@ rs_conn_receive_packet (struct rs_connection *conn,
assert (conn);
assert (conn->realm);
- assert (!conn_user_dispatch_p (conn)); /* Dispatching mode only. */
+ assert (!conn_user_dispatch_p (conn)); /* Blocking mode only. */
if (rs_packet_create (conn, &pkt))
return -1;
@@ -254,7 +254,7 @@ rs_conn_receive_packet (struct rs_connection *conn,
"event_add: %s",
evutil_gai_strerror (err));
- /* Activae retransmission timer. */
+ /* Activate retransmission timer. */
conn_activate_timeout (pkt->conn);
}
@@ -271,7 +271,10 @@ rs_conn_receive_packet (struct rs_connection *conn,
|| (req_msg
&& packet_verify_response (pkt->conn, pkt, req_msg) != RSE_OK))
{
- assert (rs_err_conn_peek_code (pkt->conn));
+ if (rs_err_conn_peek_code (pkt->conn) == RSE_OK)
+ /* No packet and no error on the stack _should_ mean that the
+ server hung up on us. */
+ rs_err_conn_push (pkt->conn, RSE_DISCO, "no response");
return rs_err_conn_peek_code (conn);
}