Minor changes

remotes/origin/feature/ch139802/phl-inconsistent-errors-when-downloading
cgonzalez 4 years ago
parent cf74ef1d17
commit 7974866e33

@ -266,9 +266,7 @@ OgrFormat.prototype.sendResponse = function (opts, callback) {
logger.info({ custom: true }, 'cleanup');
// unlink dump file (sync to avoid race condition)
console.log('removing', dumpfile);
try {
fs.unlinkSync(dumpfile);
} catch (e) {
try { fs.unlinkSync(dumpfile); } catch (e) {
if (e.code !== 'ENOENT') {
console.log('Could not unlink dumpfile ' + dumpfile + ': ' + e);
}
@ -286,6 +284,7 @@ function ExportRequest (ostream, callback, beforeSink) {
this.canceled = false;
var that = this;
this.ostream.on('close', function () {
logger.info({ custom: true }, 'close ExportRequest');
that.canceled = true;

@ -1,7 +1,6 @@
'use strict';
var Ogr = require('./../ogr');
var serverOptions = require('./../../../server-options');
function CsvFormat () {}

Loading…
Cancel
Save