Modify

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 jpstotz, 16 years ago

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 by Gubaer, 16 years ago

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 by Gubaer, 16 years ago

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. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.