Skip to content

Commit 427274b

Browse files
committed
fix: don't panic if remote::Connection::ref_map() doesn't finish the handshake (#2055)
1 parent a75b4a2 commit 427274b

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

gix/src/remote/connection/ref_map.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,11 @@ where
9090
progress: impl Progress,
9191
options: Options,
9292
) -> Result<(fetch::RefMap, gix_protocol::handshake::Outcome), Error> {
93-
let refmap = self.ref_map_by_ref(progress, options).await;
94-
let handshake = self.handshake.expect("refmap always performs handshake");
95-
refmap.map(|map| (map, handshake))
93+
let refmap = self.ref_map_by_ref(progress, options).await?;
94+
let handshake = self
95+
.handshake
96+
.expect("refmap always performs handshake and stores it if it succeeds");
97+
Ok((refmap, handshake))
9698
}
9799

98100
#[allow(clippy::result_large_err)]

0 commit comments

Comments
 (0)