From 76089be464d14527802bb45301aa42e9a75719b2 Mon Sep 17 00:00:00 2001 From: Bryan Housel Date: Wed, 3 Jun 2015 11:10:34 -0400 Subject: [PATCH] Don't wait for changeset to close before calling save callback see #2667 --- js/id/core/connection.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/id/core/connection.js b/js/id/core/connection.js index 9f69abe9e..820f155e3 100644 --- a/js/id/core/connection.js +++ b/js/id/core/connection.js @@ -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)); }); }); };