summaryrefslogtreecommitdiff
path: root/lib/send.c
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2011-03-09 10:18:06 +0100
committerLinus Nordberg <linus@nordu.net>2011-03-09 10:18:06 +0100
commitce4d6dfe1728e5633a8f49fc4b16c36df0d23521 (patch)
tree679a007b7897e03e9105a0902a84a8df1356e8c7 /lib/send.c
parentc4e2bd206bb9248843a8a4d9a945c5e49a188474 (diff)
Add retransmission timer support (UDP).
Diffstat (limited to 'lib/send.c')
-rw-r--r--lib/send.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/send.c b/lib/send.c
index f169ff9..0872471 100644
--- a/lib/send.c
+++ b/lib/send.c
@@ -35,6 +35,8 @@ _conn_open (struct rs_connection *conn, struct rs_packet *pkt)
if (conn->realm->type == RS_CONN_TYPE_TCP
|| conn->realm->type == RS_CONN_TYPE_TLS)
{
+ if (tcp_init_connect_timer (conn))
+ return -1;
if (event_init_bufferevent (conn, conn->active_peer))
return -1;
}
@@ -42,6 +44,8 @@ _conn_open (struct rs_connection *conn, struct rs_packet *pkt)
{
if (udp_init (conn, pkt))
return -1;
+ if (udp_init_retransmit_timer (conn))
+ return -1;
}
if (!conn->is_connected)