Skip to content

Commit 4ec838f

Browse files
committed
store closed flag
1 parent f56c779 commit 4ec838f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

crates/tlsn/src/utils.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,14 @@ where
8686
&& read == 0
8787
{
8888
ready!(this.io.as_mut().poll_close(cx))?;
89+
*this.closed = true;
8990
}
9091

9192
if let Poll::Ready(write) = write
9293
&& write == 0
9394
{
9495
ready!(this.duplex.as_mut().poll_close(cx))?;
96+
*this.closed = true;
9597
}
9698

9799
if matches!(read, Poll::Pending) && matches!(write, Poll::Pending) {
@@ -106,6 +108,6 @@ where
106108
S: AsyncRead + AsyncWrite + Send + Unpin,
107109
{
108110
fn is_terminated(&self) -> bool {
109-
false
111+
self.closed
110112
}
111113
}

0 commit comments

Comments
 (0)