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 <jus@bitgrid.net>
  • Loading branch information
juliushaertl committed Jun 21, 2023
1 parent 55f5a07 commit 2a05a29
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 2a05a29

Please sign in to comment.