On 13 July 2010 17:15, <[email protected]> wrote: > From: Guo-Fu Tseng <[email protected]> > > While using scripts, if the downloaded image is not bootable, the gPXE > exits faster than it have the opportunity to gracefully closing the TCP > connection. Which might lead the TCP state of remote server not closed. > > This commit waits for TCP to fully close by polling remaining ACKs from > remote server and let the gPXE reply the correct response before > shutdown the xfer interface. > > It is somehow hacky, hoping we can find better solution.
As we talked on irc, how about adding a __shutdown_fn that would clean up remaining tcp connections? i.e. if there are any not in the TIME_WAIT state, do a few net_steps and then forcefully close and clean up (including the ones in TIME_WAIT in the cleanup). I see a problem with that approach when someone sleeps in a script for longer periods, but maybe we could change sleep to also do net_step while sleeping? -- Best Regards Piotr Jaroszyński _______________________________________________ gPXE-devel mailing list [email protected] http://etherboot.org/mailman/listinfo/gpxe-devel
