1
0
mirror of https://github.com/fumiama/simple-kanban.git synced 2026-06-05 00:10:29 +08:00

try to fix upload

This commit is contained in:
源文雨
2022-11-24 23:21:28 +08:00
parent fbb932d693
commit 9716875c73

View File

@@ -616,10 +616,14 @@ static int s3_set_data(threadtimer_t *timer) {
while(remain > 0) {
// printf("remain:%d\n", (int)remain);
ssize_t n = recv(timer->accept_fd, timer->data, (remain>TIMERDATSZ)?TIMERDATSZ:remain, MSG_WAITALL);
if(n <= 0) {
if(n < 0) {
*(uint32_t*)ret = *(uint32_t*)"erro";
goto S3_RETURN;
}
else if(!n) {
usleep(10000); // 10 ms
continue;
}
if(fwrite(timer->data, n, 1, timer->fp) != 1) {
perror("fwrite");
*(uint32_t*)ret = *(uint32_t*)"erro";