Skip to content

[BUG] Crashing on iOS when aeroplane mode enabled.Β #161

@pellet

Description

@pellet

Describe the bug

When using Fusilade as a httpmessagehandler in an iOS app via

var httpHandler = new Fusillade.RateLimitedHttpMessageHandler(
                            new NSUrlSessionHandler(),
                            Fusillade.Priority.Background);
                        var httpClient = new System.Net.Http.HttpClient(httpHandler)
                        {
                            BaseAddress = uri
                        };

the app will crash when wifi and cellular is disabled(no data).

Steps To Reproduce

Expected behavior

App should work without crashing even if it does not have internet access.

Screenshots

Environment

  • OS: iOS 12.4.8
  • Device: iPhone 6
  • Version: 2.2.9
  • Working Version: None that I know of?

Additional context

Crash stack trace:

error	15:07:29.424320+1000	Life	Task <B0D7871B-099F-4E4E-A62C-57BB7A36EC01>.<1> finished with error [-1009] Error Domain=NSURLErrorDomain Code=-1009 "The Internet connection appears to be offline." UserInfo={_kCFStreamErrorCodeKey=50, NSUnderlyingError=0x2837c0030 {Error Domain=kCFErrorDomainCFNetwork Code=-1009 UserInfo={_kCFStreamErrorCodeKey=50, _kCFStreamErrorDomainKey=1}}, _NSURLErrorFailingURLSessionTaskErrorKey=<private>, _NSURLErrorRelatedURLSessionTaskErrorKey=<private>, NSLocalizedDescription=The Internet connection appears to be offline., NSErrorFailingURLStringKey=<private>, NSErrorFailingURLKey=<private>, _kCFStreamErrorDomainKey=1}
default	15:07:29.428785+1000	Life	Execution aborted in method: <<SendAsync>b__2>d::MoveNext
default	15:07:29.428833+1000	Life	Line=6471 IP=0x6623a21, Aborted execution
default	15:07:29.428864+1000	Life	0x6623a21 26f
default	15:07:29.428900+1000	Life	error: * Assertion: should not be reached at /Users/builder/jenkins/workspace/archive-mono/2020-02/ios/release/mono/mini/interp/interp.c:508

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions