Skip to content

Commit

Permalink
fix: Emit sync event after successful push to pick up syncing again
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliusknorr committed Jun 20, 2023
1 parent 5c9f626 commit 9ea4c7c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/services/SyncService.js
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ class SyncService {
return this.connection.push(data)
.then((response) => {
this.sending = false
this.emit('sync', {
steps: [],
document: this.connection.document,
version: this.version,
})
}).catch(({ response, code }) => {
logger.error('failed to apply steps due to collission, retrying')
this.sending = false
Expand Down

0 comments on commit 9ea4c7c

Please sign in to comment.