Skip to content

Commit dc5bdad

Browse files
committed
Fix: remove clients from collection
Closes: #109 PR-URL: #110
1 parent 4653b64 commit dc5bdad

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/server.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,15 +129,15 @@ const listener = application => (req, res) => {
129129
const timer = setTimeout(() => {
130130
if (finished) return;
131131
finished = true;
132-
clients.delete(res.connection);
132+
clients.delete(connection);
133133
client.error(504);
134134
}, LONG_RESPONSE);
135135

136136
res.on('close', () => {
137137
if (finished) return;
138138
finished = true;
139139
clearTimeout(timer);
140-
clients.delete(res.connection);
140+
clients.delete(connection);
141141
});
142142

143143
application.logger.log(`${method}\t${url}`);

0 commit comments

Comments
 (0)