file upload: fix race condition

bump version to 2.3-6
This commit is contained in:
Dietmar Maurer
2013-03-04 09:00:27 +01:00
parent df6b79c892
commit d6c9dc34af
3 changed files with 15 additions and 2 deletions

View File

@ -378,7 +378,14 @@ __PACKAGE__->register_method ({
print "finished file import successfully\n";
};
return $rpcenv->fork_worker('imgcopy', undef, $user, $worker);
my $upid = $rpcenv->fork_worker('imgcopy', undef, $user, $worker);
# apache removes the temporary file on return, so we need
# to wait here to make sure the worker process starts and
# opens the file before it gets removed.
sleep(1);
return $upid;
}});
1;