From 26a7e86076022dbda0fa268e5f5d1466f5286890 Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Tue, 9 Aug 2022 06:31:45 -0700 Subject: [PATCH] add debug logs on conn error/eof The caller gets this information and may do its own logging with more context. But...sometimes the caller doesn't, and being able to turn this on is handy then, so log at low priority. (debug; I considered trace even.) --- src/client/mod.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/client/mod.rs b/src/client/mod.rs index bddd87d..9825495 100644 --- a/src/client/mod.rs +++ b/src/client/mod.rs @@ -2358,8 +2358,14 @@ impl futures::Stream for Session { request); } }, - Poll::Ready(Some(Err(e))) => return Poll::Ready(Some(Err(e))), - Poll::Ready(None) => return Poll::Ready(None), + Poll::Ready(Some(Err(e))) => { + debug!("RTSP connection error: {:?}", e); + return Poll::Ready(Some(Err(e))) + }, + Poll::Ready(None) => { + debug!("Server closed RTSP connection"); + return Poll::Ready(None) + }, std::task::Poll::Pending => {} }