Skip to content

Unexpected "Connection closed" #89

Description

@floitsch

It seems like the client is not correctly reconnecting.

In a program that has no close on the Client I got the following stack trace:

This is with SDK alpha.74, and http version 2.1.0.

The project is https://github.com/floitsch/log-uploader

******************************************************************************
Decoding by `jag`, device has version <2.0.0-alpha.74>
******************************************************************************
EXCEPTION error. 
Connection closed
  0: tcp_error_                <sdk>/net/modules/tcp.toit:208:3
  1: TcpSocket_.ensure_state_  <sdk>/net/modules/tcp.toit:75:14
  2: TcpSocket.read            <sdk>/net/modules/tcp.toit:156:16
  3: BufferedReader.more_      <sdk>/reader.toit:82:22
  4: BufferedReader.ensure_    <sdk>/reader.toit:69:14
  5: BufferedReader.can_ensure <sdk>/reader.toit:109:5
  6: SymmetricSession_.read_   <sdk>/tls/session.toit:552:22
  7: SymmetricSession_.read.<block> <sdk>/tls/session.toit:541:14
  8: SymmetricSession_.read    <sdk>/tls/session.toit:539:3
  9: Session.read              <sdk>/tls/session.toit:258:54
 10: Socket.read               <sdk>/tls/socket.toit:94:21
 11: BufferedReader.more_      <sdk>/reader.toit:82:22
 12: BufferedReader.index_of   <sdk>/reader.toit:247:14
...
 20: catch                     <sdk>/core/exceptions.toit:122:1
 21: catch                     <sdk>/core/exceptions.toit:85:10
 22: Client.try_to_reuse_      <pkg:pkg-http>/client.toit:641:5
 23: Client.post_.<block>      <pkg:pkg-http>/client.toit:460:7
 24: SmallInteger_.repeat      <sdk>/core/numbers.toit:1194:3
 25: Client.post_              <pkg:pkg-http>/client.toit:458:19
 26: Client.post_json          <pkg:pkg-http>/client.toit:523:12
 27: Client.request_           <pkg:toit-supabase>/supabase.toit:270:33
 28: Client.request_           <pkg:toit-supabase>/supabase.toit:301:17
 29: PostgRest.insert          <pkg:toit-supabase>/supabase.toit:453:25
 30: main.<lambda>.<block>     main.toit:77:19
 31: Mutex.do.<block>          <sdk>/monitor.toit:28:27
 32: __Monitor__.locked_.<block> <sdk>/core/monitor_impl_.toit:123:12
 33: __Monitor__.locked_       <sdk>/core/monitor_impl_.toit:95:3
 34: Mutex.do                  <sdk>/monitor.toit:28:3
 35: main.<lambda>             main.toit:76:11
 36: main.<lambda>.<block>     main.toit:87:17
 37: LogForwarder.listen.<block> main.toit:38:7
 38: LogForwarder.listen       main.toit:58:18
 39: main.<lambda>             main.toit:86:17
******************************************************************************

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions