summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2012-04-25 15:23:06 +0200
committerLinus Nordberg <linus@nordu.net>2012-04-25 15:23:06 +0200
commit13014bf93ef9acc96d0ef61ab3ba9e0bce93fc14 (patch)
tree6d1b5b2355faf45e45076a5ff66cc2899699e5c8 /lib
parent5ca193d76d16b4dcb0ef7a2b07e4da9bd9aa3dad (diff)
Missing response packet in rs_conn_receive_packet doesn't have to be a bug.
Diffstat (limited to 'lib')
-rw-r--r--lib/conn.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/conn.c b/lib/conn.c
index ee5e771..33642e3 100644
--- a/lib/conn.c
+++ b/lib/conn.c
@@ -269,7 +269,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);
}