An infinite wait loop with a sleep in it doesn't seem like a good idea...

Are you actually seeing this?  I'm surprised.  My guess is that this occurs during the connect() call in libqb.  if connect is called with a non blocking socket, it is possible to see this sort of thing although I've only experienced this with INET sockets, not UNIX sockets.  If this is what is happening, the correct action isn't calling qb_ipcc_connect again though, we should be calling the internal socket connect() again.

If there is something to be fixed here, it likely belongs in libqb rather than pacemaker.  Perhaps a connect with a timeout value or something.