Skip to content

Commit c13de46

Browse files
committed
Update to Node 14
This brings: - More stable HTTP/2 support - Reduced memory usage (content is not retained on keep-alive sockets after the request completes) - Lots of general fixes & perf improvements
1 parent f502190 commit c13de46

File tree

3 files changed

+4
-35
lines changed

3 files changed

+4
-35
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ sudo: required
33
language: node_js
44
node_js:
55
- node
6+
- '14.6.0' # Bundled version
67
- '12'
7-
- '10.15.1'
8+
- '10'
89
- '8'
910
before_install:
1011
- sudo apt-get install p7zip-full xterm
@@ -25,7 +26,7 @@ addons:
2526
jobs:
2627
include:
2728
- stage: Build and release binaries
28-
node_js: '10.15.1'
29+
node_js: '14.6.0'
2930
echo: 'Building binaries...'
3031
script:
3132
- |

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@
145145
}
146146
},
147147
"node": {
148-
"version": "10.15.1",
148+
"version": "14.6.0",
149149
"targets": [
150150
"win32-x64",
151151
"linux-x64",

src/index.ts

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -126,36 +126,4 @@ export async function runHTK(options: {
126126

127127
console.log('Server started in', Date.now() - certSetupTime, 'ms');
128128
console.log('Total startup took', Date.now() - startTime, 'ms');
129-
}
130-
131-
import SocketWrapper = require('_stream_wrap');
132-
133-
// Quick monkey-patches to guard against a bug in SocketWrapper that can break
134-
// some of the Mockttp internals in certain WS-based cases:
135-
const originalFinishShutdown = (<any>SocketWrapper.prototype).finishShutdown;
136-
(<any>SocketWrapper.prototype).finishShutdown = function (handle: any) {
137-
if (!handle) {
138-
// We still run the code anyway (since there are cases where it
139-
// might be fine, and we can't check them externally), but we
140-
// report issues, so we can work out how widespread this is.
141-
try {
142-
return originalFinishShutdown.apply(this, arguments);
143-
} catch (e) {
144-
reportError(e);
145-
return;
146-
}
147-
}
148-
else return originalFinishShutdown.apply(this, arguments);
149-
}
150-
const originalFinishWrite = (<any>SocketWrapper.prototype).finishWrite;
151-
(<any>SocketWrapper.prototype).finishWrite = function (handle: any) {
152-
if (!handle) {
153-
try {
154-
return originalFinishWrite.apply(this, arguments);
155-
} catch (e) {
156-
reportError(e);
157-
return;
158-
}
159-
}
160-
else return originalFinishWrite.apply(this, arguments);
161129
}

0 commit comments

Comments
 (0)