Skip to content

Commit c8e8f8f

Browse files
update stale comment
1 parent dbfa623 commit c8e8f8f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

crates/cli/src/subcommands/subscribe.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -206,12 +206,11 @@ pub async fn exec(config: Config, args: &ArgMatches) -> Result<(), anyhow::Error
206206
// Close the connection gracefully.
207207
// This will return an error if the server already closed,
208208
// or the connection is in a bad state.
209-
// The error (if any) relevant to the user is already stored in `res`,
210-
// so we can ignore errors here -- graceful close is basically a
211-
// courtesy to the server.
209+
// The error (if any) relevant to the user is already stored in `res`.
212210
conn.close().await;
213-
// The server closing the connection is not considered an error,
214-
// but any other error is.
211+
// The server closing the connection is not considered an error
212+
// if `-n` is not set, but any other error is. When `-n` is set,
213+
// an early close from the update loop is reported as an error.
215214
res.or_else(|e| {
216215
if e.is_server_closed_connection() {
217216
Ok(())

0 commit comments

Comments
 (0)