瀏覽代碼

Work around another confused-by-RST bug

tags/v0.9.3
Michael Brown 18 年之前
父節點
當前提交
5edb85c8b4
共有 1 個檔案被更改,包括 8 行新增0 行删除
  1. 8
    0
      src/net/tcp.c

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

@@ -516,6 +516,14 @@ int tcp_close ( struct tcp_connection *conn ) {
516 516
 		/* FIN consumes one byte on the snd stream */
517 517
 //		conn->snd_una++;
518 518
 		goto send_tcp_nomsg;
519
+	case TCP_TIME_WAIT:
520
+#warning "Fix me"
521
+		/* In TIME_WAIT, we should just be waiting for the
522
+		 * timer to expire, which will trigger the actual
523
+		 * closure.  However, because we get confused by RST
524
+		 * packets, we end up here.  This works around the
525
+		 * problem for now.
526
+		 */
519 527
 	case TCP_SYN_SENT:
520 528
 	case TCP_LISTEN:
521 529
 		/**

Loading…
取消
儲存