rust-amqp
rust-amqp copied to clipboard
exception on session close: thread 'main' panicked at 'called `Option::unwrap()` on a `None` value',
I do my first steps with Rust and Rabbitmq. I try to implement a simple RPC client like described at https://www.rabbitmq.com/tutorials/tutorial-six-python.html
So far it works but it panic's at the last instruction:
session.close(200, "Bye");
with trace:
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', /home/grzemba/.cargo/registry/src/github.com-1ecc6299db9ec823/amqp-0.1.3/src/session.rs:241:48
stack backtrace:
0: 0x102993c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hc3687c223297c054
1: 0x106ce3c - core::fmt::write::h490009db94d7bf18
2: 0x1012544 - std::io::Write::write_fmt::h604b90bda64bdf48
3: 0xffd1b2 - std::panicking::default_hook::{{closure}}::hc949c290ca8c65e8
4: 0xffce7f - std::panicking::default_hook::h6fae44f0226862fc
5: 0xffd8ab - std::panicking::rust_panic_with_hook::h9db8509893535d48
6: 0xffd4a5 - rust_begin_unwind
7: 0x106ab80 - core::panicking::panic_fmt::h7014057c756aa717
8: 0x106aacc - core::panicking::panic::hf00692194d6c54ee
9: 0x98e1d2 - core::option::Option<T>::unwrap::hf68b7fe6e26d92cb
at /jenkins/jobs/oi-userland/workspace/components/developer/rust/build/amd64/src/libcore/macros/mod.rs:34
10: 0x989441 - amqp::session::Session::close::h2f64a2ba0f51b397
at /home/grzemba/.cargo/registry/src/github.com-1ecc6299db9ec823/amqp-0.1.3/src/session.rs:241
11: 0x98d23b - sync_send::main::hd6da51f102580f06
at src/main.rs:86
12: 0x98443b - std::rt::lang_start::{{closure}}::h71447e2d4de10a11
at /jenkins/jobs/oi-userland/workspace/components/developer/rust/build/amd64/src/libstd/rt.rs:67
13: 0x103275a - std::rt::lang_start_internal::hb6c875f54fd680ac
14: 0x984416 - std::rt::lang_start::ha253d3ac3ad929fa
at /jenkins/jobs/oi-userland/workspace/components/developer/rust/build/amd64/src/libstd/rt.rs:67
15: 0x98d45a - main
16: 0x981737 - _start_crt
17: 0x981698 - _start