Anthony Liguori
2005-Sep-15 01:38 UTC
[Xen-devel] [PATCH 2/2] Make sure that TCP binds don''t fail because of stale state
SO_REUSEADDR does not immediately free up a port when a server is killed with a signal (which is what we do for xend stop). Since there is no great way (at least, that I know of) to deal with this, the following patch implements a 30 second timeout for bind to help make it highly unlikely that we''ll get burned by this. On a very slow system, killing xend with a signal takes less than a second for the port to become available again so 30 seconds seems really safe. With this patch (and the previous one), I can execute the following: while true; do xend restart && xm list || break; done And it runs without any trouble (I ran it for an hour before finally giving up). Regards, Anthony Liguori _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel