i don't even know
This commit is contained in:
parent
56113a1cf8
commit
84e20308f2
2 changed files with 3 additions and 3 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -29,7 +29,6 @@ typings/
|
||||||
.node_repl_history
|
.node_repl_history
|
||||||
*.tgz
|
*.tgz
|
||||||
.yarn-integrity
|
.yarn-integrity
|
||||||
.env
|
|
||||||
.next
|
.next
|
||||||
.ftpconfig
|
.ftpconfig
|
||||||
coverage.lcov
|
coverage.lcov
|
||||||
|
|
|
@ -92,9 +92,10 @@ const httpServer = http.createServer((req, res) => {
|
||||||
}
|
}
|
||||||
log(`Sending image data for job ${id} to ${req.socket.remoteAddress}:${req.socket.remotePort} via HTTP`);
|
log(`Sending image data for job ${id} to ${req.socket.remoteAddress}:${req.socket.remotePort} via HTTP`);
|
||||||
res.setHeader("ext", jobs.get(id).ext);
|
res.setHeader("ext", jobs.get(id).ext);
|
||||||
return res.end(jobs.get(id).data, (err) => {
|
const data = jobs.get(id).data;
|
||||||
if (err) console.error(err);
|
|
||||||
jobs.delete(id);
|
jobs.delete(id);
|
||||||
|
return res.end(data, (err) => {
|
||||||
|
if (err) console.error(err);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
res.statusCode = 404;
|
res.statusCode = 404;
|
||||||
|
|
Loading…
Reference in a new issue