瀏覽代碼

Use start_timer_nodelay() in protocols which rely on the retry timer

to generate the initial transmission; this cuts off around 0.3s per
instantiated connection.
tags/v0.9.3
Michael Brown 17 年之前
父節點
當前提交
2ff1b1245b
共有 3 個檔案被更改,包括 3 行新增3 行删除
  1. 1
    1
      src/net/tcp.c
  2. 1
    1
      src/net/udp/dhcp.c
  3. 1
    1
      src/net/udp/tftp.c

+ 1
- 1
src/net/tcp.c 查看文件

@@ -232,7 +232,7 @@ static int tcp_open ( struct xfer_interface *xfer, struct sockaddr *peer,
232 232
 		goto err;
233 233
 
234 234
 	/* Start timer to initiate SYN */
235
-	start_timer ( &tcp->timer );
235
+	start_timer_nodelay ( &tcp->timer );
236 236
 
237 237
 	/* Attach parent interface, transfer reference to connection
238 238
 	 * list and return

+ 1
- 1
src/net/udp/dhcp.c 查看文件

@@ -912,7 +912,7 @@ int start_dhcp ( struct job_interface *job, struct net_device *netdev,
912 912
 		goto err;
913 913
 
914 914
 	/* Start timer to initiate initial DHCPREQUEST */
915
-	start_timer ( &dhcp->timer );
915
+	start_timer_nodelay ( &dhcp->timer );
916 916
 
917 917
 	/* Attach parent interface, mortalise self, and return */
918 918
 	job_plug_plug ( &dhcp->job, job );

+ 1
- 1
src/net/udp/tftp.c 查看文件

@@ -657,7 +657,7 @@ int tftp_open ( struct xfer_interface *xfer, struct uri *uri ) {
657 657
 		goto err;
658 658
 
659 659
 	/* Start timer to initiate RRQ */
660
-	start_timer ( &tftp->timer );
660
+	start_timer_nodelay ( &tftp->timer );
661 661
 
662 662
 	/* Attach to parent interface, mortalise self, and return */
663 663
 	xfer_plug_plug ( &tftp->xfer, xfer );

Loading…
取消
儲存