Opened 16 years ago
Closed 16 years ago
#2418 closed enhancement (fixed)
Refactor: Asynchronous and cancellable upload
Reported by: | anonymous | Owned by: | team |
---|---|---|---|
Priority: | minor | Milestone: | |
Component: | Core | Version: | latest |
Keywords: | Cc: | jpstotz, Gubaer |
Description
I edited some data, then I started to upload them. The upload window seems to be stuck (I saw last status message from previous batch of uploads) and nothing happened. I thought the server is probably overloaded or something like that and I pressed cancel. The status message was replaced by mesage saying "Aborting..." and cancel is greyed out. No way to get rid of that window now ....
I think aborting the upload should be immediate - what is so difficult on just closing the TCP connection?
Now the "Aborting..." window blocks me from saving my work for uploading it later :(
Attachments (0)
Change History (3)
comment:1 by , 16 years ago
Cc: | added |
---|---|
Summary: | Data loss due to inability to abort data upload → Aborting OSM upload not possible due to missing implementation |
comment:2 by , 16 years ago
Cc: | added |
---|---|
Priority: | critical → minor |
Summary: | Aborting OSM upload not possible due to missing implementation → Refactor: Asynchronous and cancellable upload |
Type: | defect → enhancement |
This has been fixed in r1581.
OsmApi now launches an asynchronous upload task. It works but it is probably the wrong place to fix it. As you point out, it would be better to add cancel() to OsmServerWriter and fix
// FIXME server.cancel();
in UploadAction.
Since the patch for r1581 was mine I'll have to patch my patch ;-) In the meantime I set priority to minor a change the ticket to an enhancement.
Well after checking the source code it doesn't surprises me that the cancel button does not work. If I am right the code behind this button is in
src/org/openstreetmap/josm/actions/UploadAction.java line 186:
Further investigations showed that aborting an upload is currently (SVN 1567) not implemented at all. From my point of view implementing it would require changes to the classes UploadAction, OsmServerWriter and OsmApi.