Skip to content

Local backup when recieving System.Net.WebException #49

@AnnabellBrocker

Description

@AnnabellBrocker

Hey everyone,

if the connection is not stable (maybe because of wrong url or other stuff) I would like to make a local backup. so far everything is already implemented. But when for example I entered the wrong url, the whole execution takes a very long time. During this time my application is frozen.
I guess the timeout is quite long, so the idea would be that the timeout needs to be smaller so that the user does not get the feeling of a frozen application.

Here is my code:

var lrs = new RemoteLRS(
trackingInitializer.LRS,
trackingInitializer.BasicAuthUsername,
trackingInitializer.BasicAuthPassword
);

try
{
StatementLRSResponse lrsResponse = lrs.SaveStatement(statement);
if (lrsResponse.success)
{
....Do Stuff ....
}
}
catch(Exception e)
{
... save local backup ....
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions