Skip to content

Commit f39bac5

Browse files
committed
Add artificial delay in DTMD
1 parent 694e4f6 commit f39bac5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contrib/multimaster/dtmd/src/server.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,9 +173,10 @@ static bool stream_flush(stream_t stream) {
173173
}
174174
{
175175
struct timespec ts;
176+
int rc;
176177
ts.tv_sec = 0;
177178
ts.tv_nsec = 100000; /* 100usec */
178-
nanosleep(&ts, NULL);
179+
while (nanosleep(&ts, &ts) < 0);
179180
}
180181
char *cursor = stream->output.data;
181182
while (tosend > 0) {

0 commit comments

Comments
 (0)