|
|
|
@ -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;
|
|
|
|
|