Modify

Opened 11 years ago

Closed 10 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 Changed 10 years ago by jpstotz

Cc: jpstotz added
Summary: Data loss due to inability to abort data uploadAborting OSM upload not possible due to missing implementation

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:

// FIXME server.cancel();

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.

comment:2 Changed 10 years ago by Gubaer

Cc: Gubaer added
Priority: criticalminor
Summary: Aborting OSM upload not possible due to missing implementationRefactor: Asynchronous and cancellable upload
Type: defectenhancement

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.

comment:3 Changed 10 years ago by Gubaer

Resolution: fixed
Status: newclosed

this is fixed in the meantime

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.