When closing a connection of clientA(using the command “/disconnect”), the connection is then closed on clientA’s side. However, the connection remained open on clientB and clientB could continue sending message to clientA and clientA would receive those messages.
This PR listens for a closing connection on clientB, then also closes clientB’s connection.
* add test for multiple local addresses
* allow transports to listen on multiple addrs
* fix tcp transport accept
* check switch addrs are correct
* switch test to port 0
* close accepted peers on close
* ignore CancelledError in transport accept
* test ci
* only accept in accept loop
* avoid accept greedyness
* close acceptedPeers
* accept doesn't crash on cancelled fut
* add common transport test
* close conn on handling failure
* close accepted peers in two steps
* test for macos
* revert accept greedyness
* fix dialing cancel
* test chronos fix
* add ws
* ws cancellation
* small fix
* remove chronos blocked test
* fix testping
* Fix transport's switch start (like #609)
* bump chronos
* Websocket: handle both ws & wss
Co-authored-by: Tanguy Cizain <tanguycizain@gmail.com>
Co-authored-by: Tanguy <tanguy@status.im>
* add 'dns' multiaddr protocol
* multiaddr: isWire is true for DNS protocols
* resolve dns on connect
* fix typo
* add dns test
* update resolveDns error handling
* handle multiple dns entries
* start of new resolver
* working dns resolver
* use the DnsResolver
* fix json logs
* small overhaul
* fix dns implem in lp2p
* update dnsclient repo
* add dns test to testnative
* dummy dns server for ut
* better mocked
* moved resolving to transport
* moved mockresolver to libp2p
* test resolve in switch test
* try multiple txt & track leaks
* raise e
* catchable error instead of exception
* save failed dns server
* moved resolve back to dialer
* remove nameresolver from dialer
* start of websocket transport
* more ws tests
* switch to common test
* add close to wsstream
* update ws & chronicles version
* cleanup
* removed multicodec
* clean ws outgoing connections
* renamed to websock
* removed stream from logs
* renamed ws to websock
* add connection closing test to common transport
* close incoming connection on ws stop
* renamed testwebsocket.nim -> testwstransport.nim
* removed raise todo
* split out/in connections
* add wss to tests
* Fix tls (#608)
* change log level
* fixed issue related to stopping
some cosmetic cleanup
* use `allFutures` to stop/close things
Prevent potential race conditions when stopping two or more transports
* misc
* point websock to server-case-object branch
* interop test with go
* removed websock version specification
* add daemon -> native ws test
* fix & test closed read/write
* update readOnce, thanks jangko
Co-authored-by: Dmitriy Ryajov <dryajov@gmail.com>
* Fixes failing test in Nim 1.4.8
This tests failed because the order in which the elements
of a hashset are added to a seq is non-deterministic.
Co-authored-by: Tanguy Cizain <tanguycizain@gmail.com>
* little transport cleanup
* rename TcpTransport.init -> TcpTransport.new
* moved transport e2e to common file
* remove localAddress
* rename testtransport -> testtcptransport
* add checktrackers to commontransports
* removed multicodec from transports
* remove pointless go_daemon page (made no sense)
* remove confusing go requirement from main readme
* wip directchat fixes
* use matchPartial for connect(wire)
* fix directchat
* revert wire changes
* rewrite directchat partially
* more readme updates
* fix things to follow the update on blog posts
* Merge master (#555)
* Revisit Floodsub (#543)
Fixes#525
add coverage to unsubscribeAll and testing
* add mounted protos to identify message (#546)
* add stable/unstable auto bumps
* fix auto-bump CI
* merge nbc auto bump with CI in order to bump only on CI success
* put conditional locks on nbc bump (#549)
* Fix minor exception issues (#550)
Makes code compatible with
https://github.com/status-im/nim-chronos/pull/166 without requiring it.
* fix nimbus ref for auto-bump stable's PR
* Split dialer (#542)
* extracting dialing logic to dialer
* exposing upgrade methods on transport
* cleanup
* fixing tests to use new interfaces
* add comments
* add base exception class and fix hierarchy
* fix imports
* `doAssert` is `ValueError` not `AssertionError`?
* revert back to `AssertionError`
Co-authored-by: Giovanni Petrantoni <7008900+sinkingsugar@users.noreply.github.com>
Co-authored-by: Jacek Sieka <jacek@status.im>
* Merge master (#555)
* Revisit Floodsub (#543)
Fixes#525
add coverage to unsubscribeAll and testing
* add mounted protos to identify message (#546)
* add stable/unstable auto bumps
* fix auto-bump CI
* merge nbc auto bump with CI in order to bump only on CI success
* put conditional locks on nbc bump (#549)
* Fix minor exception issues (#550)
Makes code compatible with
https://github.com/status-im/nim-chronos/pull/166 without requiring it.
* fix nimbus ref for auto-bump stable's PR
* Split dialer (#542)
* extracting dialing logic to dialer
* exposing upgrade methods on transport
* cleanup
* fixing tests to use new interfaces
* add comments
* add base exception class and fix hierarchy
* fix imports
* `doAssert` is `ValueError` not `AssertionError`?
* revert back to `AssertionError`
Co-authored-by: Giovanni Petrantoni <7008900+sinkingsugar@users.noreply.github.com>
Co-authored-by: Jacek Sieka <jacek@status.im>
* cleanup
Co-authored-by: Giovanni Petrantoni <7008900+sinkingsugar@users.noreply.github.com>
Co-authored-by: Jacek Sieka <jacek@status.im>
* Revisit Floodsub (#543)
Fixes#525
add coverage to unsubscribeAll and testing
* add mounted protos to identify message (#546)
* add stable/unstable auto bumps
* fix auto-bump CI
* merge nbc auto bump with CI in order to bump only on CI success
* put conditional locks on nbc bump (#549)
* Fix minor exception issues (#550)
Makes code compatible with
https://github.com/status-im/nim-chronos/pull/166 without requiring it.
* fix nimbus ref for auto-bump stable's PR
* Split dialer (#542)
* extracting dialing logic to dialer
* exposing upgrade methods on transport
* cleanup
* fixing tests to use new interfaces
* add comments
* add base exception class and fix hierarchy
* fix imports
* `doAssert` is `ValueError` not `AssertionError`?
* revert back to `AssertionError`
Co-authored-by: Giovanni Petrantoni <7008900+sinkingsugar@users.noreply.github.com>
Co-authored-by: Jacek Sieka <jacek@status.im>