X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=command.c;h=09c1b781b99f0f6270f2f1e150c269e8fad9af5d;hp=db28b39dff8362a76d668d16ca6c7ac13541a9c7;hb=e7125356421449de4614aca24446f1d198aa9b3b;hpb=97ad8ac8735dfd7a514aa66e9de54f253440c17d diff --git a/command.c b/command.c index db28b39d..09c1b781 100644 --- a/command.c +++ b/command.c @@ -363,8 +363,10 @@ static int com_sender(struct command_context *cc) for (i = 0; i < 10; i++) { mutex_lock(mmd_mutex); if (mmd->sender_cmd_data.cmd_num >= 0) { + /* another sender command is active, retry in 100ms */ + struct timespec ts = {.tv_nsec = 100 * 1000 * 1000}; mutex_unlock(mmd_mutex); - usleep(100 * 1000); + nanosleep(&ts, NULL); continue; } mmd->sender_cmd_data = scd;