Don't wait for changeset to close before calling save callback

see #2667
This commit is contained in:
Bryan Housel
2015-06-03 11:10:34 -04:00
parent a7fca1be23
commit 76089be464

View File

@@ -273,12 +273,14 @@ iD.Connection = function() {
content: JXON.stringify(connection.osmChangeJXON(changeset_id, changes))
}, function(err) {
if (err) return callback(err);
// POST was successful, safe to call the callback.
// Still attempt to close changeset, but ignore response.
// see #2667
callback(null, changeset_id);
oauth.xhr({
method: 'PUT',
path: '/api/0.6/changeset/' + changeset_id + '/close'
}, function(err) {
callback(err, changeset_id);
});
}, d3.functor(true));
});
});
};