Skip to content

Commit a756ebf

Browse files
committed
notification: Update comments
Signed-off-by: Alexandru Vasile <[email protected]>
1 parent 7683f90 commit a756ebf

File tree

1 file changed

+8
-5
lines changed
  • src/protocol/notification

1 file changed

+8
-5
lines changed

src/protocol/notification/mod.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -435,6 +435,10 @@ impl NotificationProtocol {
435435
},
436436
);
437437
}
438+
// User initiated an outbound substream but the connection was closed before the
439+
// substream was fully open.
440+
// To have consistent state tracking in the user protocol, substream rejection
441+
// must be reported to the user.
438442
(OutboundState::OutboundInitiated { substream }, _) => {
439443
tracing::debug!(
440444
target: LOG_TARGET,
@@ -452,12 +456,11 @@ impl NotificationProtocol {
452456
)
453457
.await;
454458
}
455-
// user either initiated an outbound substream or an outbound substream was
456-
// opened/being opened as a result of an accepted inbound substream but was not
457-
// yet fully open
459+
// An outbound substream was opened/being opened as a result of an accepted
460+
// inbound substream but was not yet fully open.
458461
//
459-
// to have consistent state tracking in the user protocol, substream rejection
460-
// must be reported to the user
462+
// To have consistent state tracking in the user protocol, substream rejection
463+
// must be reported to the user.
461464
(OutboundState::Negotiating | OutboundState::Open { .. }, _) => {
462465
tracing::debug!(
463466
target: LOG_TARGET,

0 commit comments

Comments
 (0)