Skip to content

Commit adc02c3

Browse files
author
taylor.smock
committed
Fix #23078: Improve cancel action on OSM API errors (patch by gaben, heavily modified)
git-svn-id: https://josm.openstreetmap.de/svn/trunk@18779 0c6e7542-c601-0410-84e7-c038aed88b3b
1 parent 326c61c commit adc02c3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/org/openstreetmap/josm/io/OsmApi.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,9 @@ public void initialize(ProgressMonitor monitor, boolean fastFail) throws OsmTran
248248
if (initialized)
249249
return;
250250
cancel = false;
251+
if (monitor != null) {
252+
monitor.addCancelListener(this::cancel);
253+
}
251254
try {
252255
CapabilitiesCache cache = new CapabilitiesCache(monitor, fastFail);
253256
try {

0 commit comments

Comments
 (0)