mirror of
https://github.com/haiwen/seafile.git
synced 2025-01-09 04:17:30 +08:00
[server] Fix a bug in recvfs-proc.
pending_objects should be decreased after the object is written into disk.
This commit is contained in:
parent
a41fe51b37
commit
b39636217c
@ -262,6 +262,7 @@ static void
|
||||
on_fs_write (OSAsyncResult *res, void *cb_data)
|
||||
{
|
||||
CcnetProcessor *processor = cb_data;
|
||||
USE_PRIV;
|
||||
|
||||
if (!res->success) {
|
||||
g_warning ("[recvfs] Failed to write %s.\n", res->obj_id);
|
||||
@ -271,6 +272,8 @@ on_fs_write (OSAsyncResult *res, void *cb_data)
|
||||
return;
|
||||
}
|
||||
|
||||
--priv->pending_objects;
|
||||
|
||||
#ifdef DEBUG
|
||||
seaf_debug ("[recvfs] Wrote fs object %s.\n", res->obj_id);
|
||||
#endif
|
||||
@ -445,8 +448,6 @@ recv_fs_object (CcnetProcessor *processor, char *content, int clen)
|
||||
|
||||
seaf_debug ("[recvfs] Recv fs object %.8s.\n", pack->id);
|
||||
|
||||
--priv->pending_objects;
|
||||
|
||||
fs_obj = seaf_fs_object_from_data(pack->id,
|
||||
pack->object, clen - sizeof(ObjectPack),
|
||||
(priv->repo_version > 0));
|
||||
|
Loading…
Reference in New Issue
Block a user