toitlang / toitlang/pkg-http

Connection closed

Open
#90 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Toit
Stars
3
Forks
2
Avg merge
53m
Merged PRs (30d)
1

Description

Got the following error on a log-running program that sporadically uses the http connection:

******************************************************************************
Decoding by `jag`, device has version <2.0.0-alpha.74>
******************************************************************************
EXCEPTION error. 
Connection closed
  0: tcp_set_option_           <sdk>/net/modules/tcp.toit:214:3
  1: TcpSocket_.set_option_    <sdk>/net/modules/tcp.toit:89:12
  2: TcpSocket.no_delay=       <sdk>/net/modules/tcp.toit:137:33
  3: Socket.no_delay=          <sdk>/tls/socket.toit:121:22
  4: Connection.send_headers   <pkg:pkg-http>/connection.toit:117:22
  5: RequestOutgoing.send      <pkg:pkg-http>/request.toit:48:32
  6: Client.post_.<block>.<block> <pkg:pkg-http>/client.toit:463:28
  7: Client.try_to_reuse_.<block> <pkg:pkg-http>/client.toit:642:7
  8: catch.<block>             <sdk>/core/exceptions.toit:124:10
  9: catch                     <sdk>/core/exceptions.toit:122:1
 10: catch                     <sdk>/core/exceptions.toit:85:10
 11: Client.try_to_reuse_      <pkg:pkg-http>/client.toit:641:5
 12: Client.post_.<block>      <pkg:pkg-http>/client.toit:460:7
 13: SmallInteger_.repeat      <sdk>/core/numbers.toit:1194:3
 14: Client.post_              <pkg:pkg-http>/client.toit:458:19
 15: Client.post_json          <pkg:pkg-http>/client.toit:523:12
 16: Client.request_           <pkg:toit-supabase>/supabase.toit:270:33
 17: Client.request_           <pkg:toit-supabase>/supabase.toit:301:17
 18: PostgRest.insert          <pkg:toit-supabase>/supabase.toit:453:25
 19: main.<block>.<lambda>.<block> main.toit:116:23
 20: Mutex.do.<block>          <sdk>/monitor.toit:28:27
 21: __Monitor__.locked_.<block> <sdk>/core/monitor_impl_.toit:123:12
 22: __Monitor__.locked_       <sdk>/core/monitor_impl_.toit:95:3
 23: Mutex.do                  <sdk>/monitor.toit:28:3
 24: main.<block>.<lambda>     main.toit:115:15
 25: main.<block>.<lambda>     main.toit:129:17

Probably related to #89

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with pkg-http/connection.toit at the set_option call shown in the trace, then read pkg-http/client.toit around try_to_reuse_ and post_. Compare the failure with issue #89 and reproduce it in a long-running program that intermittently uses the HTTP connection. Done should include a confirmed relationship or diagnosis and a verified resolution.

Written by the indexing model from the issue text.

Assessment

Domain
embedded-iot, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.