Support no_wait for Exchange_declare

This commit is contained in:
Tony Garnock-Jones 2012-05-10 11:47:09 -04:00
parent 215d869b51
commit 8d893ebbee
1 changed files with 7 additions and 2 deletions

View File

@ -288,10 +288,15 @@ let handle_method conn channel m =
then return ()
else send_method conn channel Exchange_declare_ok
| Exchange_declare (exchange, type_, passive, durable, no_wait, arguments) ->
let (reply_sink, reply_name) =
if no_wait
then ("", "")
else (conn.name.Node.label, "Exchange_declare_reply")
in
Node.send_ignore' "factory" (Message.create (Sexp.Str type_,
Sexp.Arr [Sexp.Str exchange],
Sexp.Str conn.name.Node.label,
Sexp.Str "Exchange_declare_reply"))
Sexp.Str reply_sink,
Sexp.Str reply_name))
| Queue_declare (queue, passive, durable, exclusive, auto_delete, no_wait, arguments) ->
let queue = (if queue = "" then Uuid.create () else queue) in
conn.recent_queue_name <- Some (Node.name_of_string queue);