Fix incorrect synchronization for Plugin:_pull that would make polling flaky

This commit is contained in:
Lucien Greathouse
2018-06-10 15:13:49 -07:00
parent 1b82044d7d
commit 82ba583fa0

View File

@@ -289,9 +289,14 @@ function Plugin:syncIn()
table.insert(routes, {name})
end
self:_pull(api, info.project, routes)
local pullSuccess, pullResult = self:_pull(api, info.project, routes):await()
self._syncInProgress = false
if not pullSuccess then
return Promise.reject(pullResult)
end
print("Rojo: Sync successful!")
end)
:catch(function(err)