multi-sock: fixes race condition