Coder Social home page Coder Social logo

nerves_hub_link_common's People

Contributors

connorrigby avatar fhunleth avatar jjcarstens avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

nerves_hub_link_common's Issues

Allow custom retry config

Downloader's retry config should be customizable.

I suggest we use the following application env:

config :nerves_hub_link_common, :retry_config, [...]

This env could be merged with default settings for creating initial %RetryConfig{} structure

Downloader crash

I published a firmware update to a device with a slow connection.

15:03:27.630 [error] [NervesHubLink] Nonfatal HTTP download error: :idle_timeout

15:03:41.492 [debug] FWUP PROG: 92%

15:03:42.567 [debug] FWUP PROG: 93%

15:03:42.632 [info]  Resuming download attempt number 1 URLREDACTED

15:03:42.867 [error] GenServer #PID<0.1362.0> terminating
** (stop) :unknown
Last message: {:ssl, {:sslsocket, {:gen_tcp, #Port<0.236>, :tls_connection, :undefined}, [#PID<0.1366.0>, #PID<0.1365.0>]}, <<255, 79, 198, 117, 10, 235, 65, 57, 172, 99, 223, 25, 252, 91, 84, 53, 217, 178, 222, 245, 254, 20, 183, 179, 108, 26, 62, 215, 227, 51, 30, 159, 127, 192, 51, 230, 110, 185, 1, 188, 226, 182, 104, 212, 163, 78, 58, ...>>}
State: %NervesHubLinkCommon.Downloader{conn: %Mint.HTTP2{buffer: <<0, 0, 4, 8, 0, 0, 0, 0, 0, 0, 15, 0, 1>>, client_settings: %{enable_push: true, max_concurrent_streams: 100, max_frame_size: 16384}, client_settings_queue: {[[]], []}, decode_table: %HPAX.Table{entries: [], length: 0, max_table_size: 4096, size: 0}, encode_table: %HPAX.Table{entries: [{"x-retry-number", "1"}], length: 1, max_table_size: 4096, size: 47}, headers_being_processed: nil, hostname: "storage.googleapis.com", mode: :active, next_stream_id: 5, open_client_stream_count: 1, open_server_stream_count: 0, ping_queue: {[], []}, port: 443, private: %{}, proxy_headers: [], ref_to_stream_id: %{#Reference<0.731420612.3736862721.70410> => 3}, scheme: "https", server_settings: %{enable_connect_protocol: false, enable_push: true, initial_window_size: 1048576, max_concurrent_streams: 100, max_frame_size: 16384, max_header_list_size: 65536}, socket: {:sslsocket, {:gen_tcp, #Port<0.245>, :tls_connection, :undefined}, [#PID<0.1371.0>, #PID<0.1370.0>]}, state: :open, streams: %{3 => %{id: 3, received_first_headers?: false, ref: #Reference<0.731420612.3736862721.70410>, state: :half_closed_local, window_size: 1048576}}, transport: Mint.Core.Transport.SSL, window_size: 65535}, content_length: 31303977, downloaded_length: 28654413, handler_fun: #Function<1.29642029/1 in NervesHubLinkCommon.UpdateManager.start_fwup_stream/2>, max_timeout: #Reference<0.731420612.3736862721.60438>, request_ref: #Reference<0.731420612.3736862721.70410>, response_headers: [], retry_args: %NervesHubLinkCommon.Downloader.RetryConfig{idle_timeout: 60000, max_disconnects: 10, max_timeout: 86400000, time_between_retries: 15000, worst_case_download_speed: 30000}, retry_number: 1, retry_timeout: #Reference<0.731420612.3736862721.70025>, status: nil, uri: %URI{authority: "storage.googleapis.com", fragment: nil, host: "REDACTED", path: "REDACTED", port: 443, query: "X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=REDACTED&X-Amz-Date=20220301T145947Z&X-Amz-Expires=86400&X-Amz-SignedHeaders=host&X-Amz-Signature=0ab91c1725c9e1c3a20804e02260562fc41ada37286fccb751d7f5d77c505dde", scheme: "https", userinfo: nil}, worst_case_timeout: #Reference<0.731420612.3736862721.60562>, worst_case_timeout_remaining_ms: 8129554}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.