chanmgr: Report Pt errors correctly.
We were panicking if the PtMgr gave us an error, which isn't so good.
This commit is contained in:
parent
f08cfb6567
commit
4fff9f9dda
|
@ -160,7 +160,7 @@ impl ChannelFactory for CompoundFactory {
|
|||
Some(mgr) => mgr
|
||||
.factory_for_transport(a.transport())
|
||||
.await
|
||||
.expect("TODO pt-client")
|
||||
.map_err(|e| crate::Error::Pt(e))?
|
||||
.ok_or_else(|| crate::Error::NoSuchTransport(a.transport().clone().into()))?,
|
||||
None => return Err(crate::Error::NoSuchTransport(a.transport().clone().into())),
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue