Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix stack overflow when printing a SubstreamRef #599

Merged
merged 4 commits into from
Nov 3, 2018

Conversation

tomaka
Copy link
Member

@tomaka tomaka commented Nov 2, 2018

Does the same as #562 but the way I imagined it.

.field("listen_addr", listen_addr)
NodeEvent::InboundSubstream { .. } => {
f.debug_struct("NodeEvent::OutboundClosed")
.field("substream", &"...")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it not be useful to include the substream debug output here? After all, this was the primary motivation for adding the Debug impl for SubstreamRef IIRC.

where TTrans: Transport,
<TTrans::Listener as Stream>::Error: fmt::Debug,
impl<TMuxer, TUserData> fmt::Debug for NodeEvent<TMuxer, TUserData>
where
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> git diff --check master 
core/src/nodes/node.rs:350: trailing whitespace.
+where 

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our .editorconfig specifies trim_trailing_whitespace=true. I wonder why it is not picked up?

@tomaka tomaka requested a review from twittner November 2, 2018 16:02
@tomaka tomaka merged commit 631ceae into libp2p:master Nov 3, 2018
@tomaka tomaka deleted the fix-overflow branch November 3, 2018 08:54
tomaka added a commit to tomaka/libp2p-rs that referenced this pull request Nov 5, 2018
* Fix stack overflow when printing a SubstreamRef

* Fix concern

* More problems
dvdplm added a commit to dvdplm/rust-libp2p that referenced this pull request Nov 6, 2018
…e-handled_node_tasks

* upstream/master:
  Inject event by value in ProtocolsHandler (libp2p#605)
  Add a PeriodicPingHandler and a PingListenHandler (libp2p#574)
  Fix stack overflow when printing a SubstreamRef (libp2p#599)
  Add a peer id generator (libp2p#583)
  eg. -> e.g.; ie. -> i.e. via repren (libp2p#592)
dvdplm added a commit to dvdplm/rust-libp2p that referenced this pull request Nov 6, 2018
…rs-to-vecdeque

* upstream/master:
  Inject event by value in ProtocolsHandler (libp2p#605)
  Add a PeriodicPingHandler and a PingListenHandler (libp2p#574)
  Fix stack overflow when printing a SubstreamRef (libp2p#599)
  Add a peer id generator (libp2p#583)
  eg. -> e.g.; ie. -> i.e. via repren (libp2p#592)
dvdplm added a commit to dvdplm/rust-libp2p that referenced this pull request Nov 7, 2018
…_swarm

* upstream/master:
  Inject event by value in ProtocolsHandler (libp2p#605)
  Add a PeriodicPingHandler and a PingListenHandler (libp2p#574)
  Fix stack overflow when printing a SubstreamRef (libp2p#599)
  Add a peer id generator (libp2p#583)
  eg. -> e.g.; ie. -> i.e. via repren (libp2p#592)
dvdplm added a commit to dvdplm/rust-libp2p that referenced this pull request Nov 9, 2018
…lection_stream

* upstream/master:
  Use vecdeque for fair polling (libp2p#610)
  Add back the Swarm (libp2p#613)
  Remove dependency on tokio_current_thread (libp2p#606)
  Use chashmap from crates (libp2p#615)
  Fix grammar in core/nodes etc. (libp2p#608)
  Inject event by value in ProtocolsHandler (libp2p#605)
  Add a PeriodicPingHandler and a PingListenHandler (libp2p#574)
  Fix stack overflow when printing a SubstreamRef (libp2p#599)
  Add a peer id generator (libp2p#583)
  eg. -> e.g.; ie. -> i.e. via repren (libp2p#592)
  Add a IdentifyTransport (libp2p#569)
  Tests for HandledNode (libp2p#546)
  Some minor fixes reported by clippy (libp2p#600)
  Add a PeriodicIdentification protocol handler (libp2p#579)
  Add ProtocolsHandler trait (libp2p#573)
  Use paritytech/rust-secp256k1 (libp2p#598)
  Use websocket 0.21.0 (libp2p#597)
  Reexport multihash from the facade (libp2p#587)
  Add substrate to the list of projects using libp2p (libp2p#595)
  Remove spaces before semicolons (libp2p#591)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants