Closed divarvel closed 9 years ago
Are you using the latest version (from github)? I've tried running your gist, it complained about the password,
I didn't put the password in clear in a public gist (I can send it to you if you want to make tests). I've tried it both with the last version published on cargo (0.0.8) and the github version, the same thing happens, it hangs after the Connection Open packet.
Server is expected to send connection.Open-OK,
do you have an access to server logs?
It maybe that reading_loop has crashed, can you add
extern crate env_logger;
to your app,
call env_logger::init().unwrap();
in main
function,
and then run program with RUST_LOG=debug
env variable, ie:
RUST_LOG=debug ./target/debug/examples/simple
I don't have access to the server logs, I'll try to find more information.
The logs output by rust-ampq are interesting though:
the server returns a connection.start message with connection.blocked: true
, then
the connection fails on a "reset by peer" error, and it makes the reading loop exit.
https://gist.github.com/7e207cc110b56d23a368
I'll investigate on why the server does that.
Interestingly enough, putting a wrong password gives this : (it panicks and crashes the whole program) https://gist.github.com/f6235442013509528fad
Ok found it, the leading / in the vhost is not removed. I'll write a PR for that. I'll try to also fix the hanging issue, if I can.
Thanks, I also created my own account on cloudamqp so I can test it there myself.
I'm using the example code from
examples/simple.rs
https://gist.github.com/divarvel/d19b0157cfc3f21f4f7a
The line "Openned session" is never printed, no error is displayed.
wireshark shows the connection opening packets, it seems to stop at some point.