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
|
||||
*.tgz
|
||||
.yarn-integrity
|
||||
.env
|
||||
.next
|
||||
.ftpconfig
|
||||
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`);
|
||||
res.setHeader("ext", jobs.get(id).ext);
|
||||
return res.end(jobs.get(id).data, (err) => {
|
||||
const data = jobs.get(id).data;
|
||||
jobs.delete(id);
|
||||
return res.end(data, (err) => {
|
||||
if (err) console.error(err);
|
||||
jobs.delete(id);
|
||||
});
|
||||
} else {
|
||||
res.statusCode = 404;
|
||||
|
|
Loading…
Reference in a new issue