Skip to content

Commit

Permalink
Clear network field in transport when disconnecting. (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
floitsch authored Oct 20, 2023
1 parent 2206a31 commit 7cb455d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tcp.toit
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 136,10 @@ class ReconnectingTransport_ extends TcpTransport:

disconnect:
if not open_: return
if network_: network_.close
if network_:
network := network_
network_ = null
network.close

class ReconnectingTlsTransport_ extends ReconnectingTransport_:
certificate_ /tls.Certificate?
Expand Down

0 comments on commit 7cb455d

Please sign in to comment.