Skip to content

Commit 73e2791

Browse files
committed
- prevent sending submitOps if websocket is disconnected
- bump version
1 parent dec73ee commit 73e2791

6 files changed

Lines changed: 13 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Change Logs
22

3+
## v0.5.8
4+
5+
- prevent sending `submitOps` if websocket is disconnected
6+
7+
38
## v0.5.7
49

510
- fix typo

dist/sharehub.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,9 @@
8080
hub.src.call(this, import$(import$({}, o), {
8181
opsOut: function(ops){
8282
var _id, tid;
83+
if (this$.ews.status() !== 2) {
84+
return;
85+
}
8386
_id = ops._id;
8487
tid = watchdog.track();
8588
this$.doc.submitOp(JSON.parse(JSON.stringify(ops)), watchdog.untrack(tid));

dist/sharehub.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"dist/**/*"
99
],
1010
"description": "access scoped data via piped operational transformation",
11-
"version": "0.5.7",
11+
"version": "0.5.8",
1212
"homepage": "https://github.com/plotdb/datahub",
1313
"repository": {
1414
"type": "git",

src/sharehub.ls

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ sharehub = (o={}) ->
3939

4040
hub.src.call @, {} <<< o <<< do
4141
ops-out: (ops) ~>
42+
if @ews.status! != 2 => return
4243
_id = ops._id
4344
# DATA: we only have to apply if we decide to make a clone of remote obj when init
4445
#@data = json0.type.apply @data, ops

0 commit comments

Comments
 (0)