onDisconnect event behaviour

11 views
Skip to first unread message

DOBRO

unread,
Jun 9, 2010, 6:38:07 AM6/9/10
to amqp-js
Hi Dan!
I noticed that onDisconnect event does not fire when connection is
closed.

I'm using RabbitMQ 1.7.2. When I stop rabbit node with invoking
"rabbitmqctl stop", the log message appears in Firebug console:
--- Begin ConnectionClose
--- replyCode = 320;
replyText = CONNECTION_FORCED - broker forced connection closure with
reason 'shutdown';
classId = 0;
methodId = 0;
---- End ConnectionClose ----

... but onDisconnect event does not fire.

If AMQP broker is not running and I reload HTML page in browser,
onDisconnect fires immediately.

p.s. I've applied several patches on github regarding previous issues.

Thanks,
DOBRO.

Dan Simpson

unread,
Jun 10, 2010, 12:20:48 PM6/10/10
to amq...@googlegroups.com
Dobro,

I will review the patches tonight, pull those that are good, and I will also investigate the onDisconnect issue as it may be an actionscript issue.

--Dan


--
You received this message because you are subscribed to the Google Groups "amqp-js" group.
To post to this group, send email to amq...@googlegroups.com.
To unsubscribe from this group, send email to amqp-js+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/amqp-js?hl=en.


DOBRO

unread,
Jun 17, 2010, 5:37:56 AM6/17/10
to amqp-js
Dan,

I've applied a patch which resolves this issue.
onDisconnect didn't fire because _stream.close() was called in
function onClose (ControlChannel.as).

According to ActionScript documentation (
http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/Socket.html
)
"The close event is dispatched only when the server closes the
connection; it is not dispatched when you call the Socket.close()
method. "

--DOBRO.


Reply all
Reply to author
Forward
0 new messages