We currently do not wait for a received FIN before exiting to boot a loaded OS. In the common case of booting from an HTTP server, this means that the TCP connection is left consuming resources on the server side: the server will retransmit the FIN several times before giving up. Fix by initiating a graceful close of all TCP connections and waiting (for up to one second) for all connections to finish closing gracefully (i.e. for the outgoing FIN to have been sent and ACKed, and for the incoming FIN to have been received and ACKed at least once). Signed-off-by: Michael Brown <mcb30@ipxe.org>tags/v1.20.1
|
|
||
420 |
|
420 |
|
421 |
|
421 |
|
422 |
|
422 |
|
|
423 |
|
|
|
424 |
|
|
|
425 |
|
|
|
426 |
|
|
|
427 |
|
|
|
428 |
|
|
|
429 |
|
|
423 |
|
430 |
|
424 |
|
431 |
|
425 |
|
432 |
|
|
|
||
1501 |
|
1501 |
|
1502 |
|
1502 |
|
1503 |
|
1503 |
|
|
1504 |
|
|
|
1505 |
|
|
|
1506 |
|
|
|
1507 |
|
|
|
1508 |
|
|
|
1509 |
|
|
|
1510 |
|
|
|
1511 |
|
|
|
1512 |
|
|
|
1513 |
|
|
|
1514 |
|
|
|
1515 |
|
|
|
1516 |
|
|
|
1517 |
|
|
|
1518 |
|
|
|
1519 |
|
|
|
1520 |
|
|
|
1521 |
|
|
|
1522 |
|
|
|
1523 |
|
|
|
1524 |
|
|
|
1525 |
|
|
|
1526 |
|
|
|
1527 |
|
|
|
1528 |
|
|
|
1529 |
|
|
|
1530 |
|
|
|
1531 |
|
|
|
1532 |
|
|
|
1533 |
|
|
|
1534 |
|
|
|
1535 |
|
|
|
1536 |
|
|
|
1537 |
|
|
|
1538 |
|
|
|
1539 |
|
|
|
1540 |
|
|
1504 |
|
1541 |
|
1505 |
|
1542 |
|
1506 |
|
1543 |
|
1507 |
|
1544 |
|
1508 |
|
1545 |
|
1509 |
|
1546 |
|
|
1547 |
|
|
|
1548 |
|
|
|
1549 |
|
|
|
1550 |
|
|
|
1551 |
|
|
|
1552 |
|
|
|
1553 |
|
|
|
1554 |
|
|
|
1555 |
|
|
|
1556 |
|
|
|
1557 |
|
|
|
1558 |
|
|
|
1559 |
|
|
|
1560 |
|
|
|
1561 |
|
|
|
1562 |
|
|
|
1563 |
|
|
1510 |
|
1564 |
|
|
1565 |
|
|
1511 |
|
1566 |
|
1512 |
|
1567 |
|
1513 |
|
1568 |
|
|
|
||
1517 |
|
1572 |
|
1518 |
|
1573 |
|
1519 |
|
1574 |
|
1520 |
|
|
|
|
1575 |
|
|
1521 |
|
1576 |
|
1522 |
|
1577 |
|
1523 |
|
1578 |
|