Skip to content

Commit c976a01

Browse files
authored
fix: always close gridfs upload stream on finish (#2758)
1 parent 6887e8d commit c976a01

File tree

2 files changed

+40
-0
lines changed

2 files changed

+40
-0
lines changed

.evergreen/config.yml

+39
Original file line numberDiff line numberDiff line change
@@ -1468,6 +1468,12 @@ buildvariants:
14681468
- test-4.4-ocsp-soft-fail
14691469
- test-4.4-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple
14701470
- test-4.4-ocsp-malicious-no-responder-mustStaple-server-does-not-staple
1471+
- name: macos-1014-fermium
1472+
display_name: macOS 10.14 Node Fermium
1473+
run_on: macos-1014
1474+
expansions:
1475+
NODE_LTS_NAME: fermium
1476+
tasks: *ref_0
14711477
- name: macos-1014-dubnium
14721478
display_name: macOS 10.14 Node Dubnium
14731479
run_on: macos-1014
@@ -1572,6 +1578,12 @@ buildvariants:
15721578
- test-4.4-ocsp-soft-fail
15731579
- test-4.4-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple
15741580
- test-4.4-ocsp-malicious-no-responder-mustStaple-server-does-not-staple
1581+
- name: rhel70-fermium
1582+
display_name: RHEL 7.0 Node Fermium
1583+
run_on: rhel70-small
1584+
expansions:
1585+
NODE_LTS_NAME: fermium
1586+
tasks: *ref_1
15751587
- name: rhel70-dubnium
15761588
display_name: RHEL 7.0 Node Dubnium
15771589
run_on: rhel70-small
@@ -1642,6 +1654,12 @@ buildvariants:
16421654
- test-auth-kerberos-legacy
16431655
- test-auth-kerberos-unified
16441656
- test-auth-ldap
1657+
- name: ubuntu-14.04-fermium
1658+
display_name: Ubuntu 14.04 Node Fermium
1659+
run_on: ubuntu1404-test
1660+
expansions:
1661+
NODE_LTS_NAME: fermium
1662+
tasks: *ref_2
16451663
- name: ubuntu-14.04-dubnium
16461664
display_name: Ubuntu 14.04 Node Dubnium
16471665
run_on: ubuntu1404-test
@@ -1735,6 +1753,13 @@ buildvariants:
17351753
- test-4.4-ocsp-soft-fail
17361754
- test-4.4-ocsp-malicious-invalid-cert-mustStaple-server-does-not-staple
17371755
- test-4.4-ocsp-malicious-no-responder-mustStaple-server-does-not-staple
1756+
- name: ubuntu-18.04-fermium
1757+
display_name: Ubuntu 18.04 Node Fermium
1758+
run_on: ubuntu1804-test
1759+
expansions:
1760+
NODE_LTS_NAME: fermium
1761+
CLIENT_ENCRYPTION: true
1762+
tasks: *ref_3
17381763
- name: ubuntu-18.04-dubnium
17391764
display_name: Ubuntu 18.04 Node Dubnium
17401765
run_on: ubuntu1804-test
@@ -1827,6 +1852,13 @@ buildvariants:
18271852
NODE_LTS_NAME: argon
18281853
MSVS_VERSION: 2013
18291854
tasks: *ref_4
1855+
- name: windows-64-vs2015-fermium
1856+
display_name: Windows (VS2015) Node Fermium
1857+
run_on: windows-64-vs2015-large
1858+
expansions:
1859+
NODE_LTS_NAME: fermium
1860+
MSVS_VERSION: 2015
1861+
tasks: *ref_4
18301862
- name: windows-64-vs2015-erbium
18311863
display_name: Windows (VS2015) Node Erbium
18321864
run_on: windows-64-vs2015-large
@@ -1862,6 +1894,13 @@ buildvariants:
18621894
NODE_LTS_NAME: argon
18631895
MSVS_VERSION: 2015
18641896
tasks: *ref_4
1897+
- name: windows-64-vs2017-fermium
1898+
display_name: Windows (VS2017) Node Fermium
1899+
run_on: windows-64-vs2017-large
1900+
expansions:
1901+
NODE_LTS_NAME: fermium
1902+
MSVS_VERSION: 2017
1903+
tasks: *ref_4
18651904
- name: windows-64-vs2017-erbium
18661905
display_name: Windows (VS2017) Node Erbium
18671906
run_on: windows-64-vs2017-large

lib/gridfs-stream/upload.js

+1
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ function checkDone(_this, callback) {
284284
return __handleError(_this, error, callback);
285285
}
286286
_this.emit('finish', filesDoc);
287+
_this.emit('close');
287288
});
288289

289290
return true;

0 commit comments

Comments
 (0)