Skip to content

Commit 2fb698d

Browse files
dignifiedquiredaviddias
authored andcommitted
Fix blockstore source end (#102)
* fix(blockstore): do not end source before everything was emitted * chore(travis): update config
1 parent 83b33c9 commit 2fb698d

File tree

2 files changed

+23
-10
lines changed

2 files changed

+23
-10
lines changed

.travis.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
sudo: false
22
language: node_js
3-
node_js:
4-
- 4
5-
- 6
6-
- stable
3+
matrix:
4+
include:
5+
- node_js: 4
6+
env: CXX=g++-4.8
7+
- node_js: 6
8+
env:
9+
- SAUCE=true
10+
- CXX=g++-4.8
11+
- node_js: stable
12+
env: CXX=g++-4.8
713

814
# Make sure we have new NPM.
915
before_install:
@@ -14,12 +20,17 @@ script:
1420
- npm test
1521
- npm run coverage
1622

17-
addons:
18-
firefox: 'latest'
19-
2023
before_script:
2124
- export DISPLAY=:99.0
2225
- sh -e /etc/init.d/xvfb start
2326

2427
after_success:
2528
- npm run coverage-publish
29+
30+
addons:
31+
firefox: 'latest'
32+
apt:
33+
sources:
34+
- ubuntu-toolchain-r-test
35+
packages:
36+
- g++-4.8

src/stores/blockstore.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,15 +123,17 @@ exports.setUp = (basePath, BlobStore, locks) => {
123123
const source = (end, cb) => {
124124
if (end) {
125125
ended = end
126-
}
127-
if (ended) {
128-
return cb(ended)
126+
return cb(end)
129127
}
130128

131129
if (written.length) {
132130
return cb(null, written.shift())
133131
}
134132

133+
if (ended) {
134+
return cb(ended)
135+
}
136+
135137
push = cb
136138
}
137139

0 commit comments

Comments
 (0)