I am running on Windows 7.

I have a program that uses winpcap to wait for BOOTP packets to come from a destination and identify its IP address.
It then opens a socket, call it X9, and binds it to port 9 at that IP address. This binding happens only once.

It now sends several packets to X9 using sentto.
These all are sent (and received at the other end) correctly.
The program then opens, uses, and closes a couple of other sockets on different ports at the same IP address.

I now try to repeat the original sequence, starting with a wait for BOOTP packets, but this time, I do not attempt to recreate the binding of X9; it is left in its previous state.

This time, the sending of several packets to X9 doesn't work.
The calls to sendto appear to work and return not an error status but the expected size of data transmitted.
Using WireShark, I do not see any packets being transmitted.
Everything I have looked at in relation to these transfers appears identical to the working case.

However, if I wait 10 or 20 seconds before starting to wait for BOOTP and the rest, everything works again.

Does anyone have any idea what may be causing this behaviour?

I know that closing and reopening the same port can fail (explicitly with error 10048) as Windows takes its time actually to close ports.
In this case, however, I am not closing or opening anything on port 9 after the initial open.