diff options
author | Linus Nordberg <linus@nordu.net> | 2011-03-09 10:18:06 +0100 |
---|---|---|
committer | Linus Nordberg <linus@nordu.net> | 2011-03-09 10:18:06 +0100 |
commit | ce4d6dfe1728e5633a8f49fc4b16c36df0d23521 (patch) | |
tree | 679a007b7897e03e9105a0902a84a8df1356e8c7 /lib/packet.c | |
parent | c4e2bd206bb9248843a8a4d9a945c5e49a188474 (diff) |
Add retransmission timer support (UDP).
Diffstat (limited to 'lib/packet.c')
-rw-r--r-- | lib/packet.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/packet.c b/lib/packet.c index 799234f..2611b46 100644 --- a/lib/packet.c +++ b/lib/packet.c @@ -88,7 +88,7 @@ packet_do_send (struct rs_packet *pkt) } #endif - if (pkt->conn->bev) + if (pkt->conn->bev) /* TCP. */ { int err = bufferevent_write (pkt->conn->bev, pkt->rpkt->data, pkt->rpkt->data_len); @@ -97,13 +97,15 @@ packet_do_send (struct rs_packet *pkt) "bufferevent_write: %s", evutil_gai_strerror (err)); } - else + else /* UDP. */ { struct rs_packet **pp = &pkt->conn->out_queue; while (*pp && (*pp)->next) *pp = (*pp)->next; *pp = pkt; + + conn_activate_timeout (pkt->conn); /* Retransmission timer. */ } return RSE_OK; |