When the server is restarted the write to unix socket fails with EPIPE. In such case, don't fail all the calls in queue; instead, after a sync of the ovsdb state (through a monitor call), start processing the queue again, including the call that previously failed.
Add a retry counter to avoid that calls are stuck in the queue forever in a hypothetical scenario in which the write always fails.