Mezone / as3-stomp

Automatically exported from code.google.com/p/as3-stomp
0 stars 0 forks source link

Patch to expose securityexception events + connection error reporting + different reconnect strategy #12

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Setup ActiveMQ.
2. Serve appropriate cross-domain file
3. Stop ActiveMQ, but leave server up with cross-domain file.
4. Attempt to connect.  You'll get a SecurityException about 20 seconds
after you get an IOErrorEvent (and screws up the reconnecting).

What is the expected output? What do you see instead?
No SecurityException should be reported later, only the initial IO exception.

What version of the product are you using? On what operating system?

Please provide any additional information below.

Attached is a patch file that fixes this issue, and exposes
securityexception events from Stomp.as.

Also added:
- ReconnectFailedEvent
   - thrown when a reconnection attempt has failed (rather than throw an
exception in the event thread where it cannot be caught).
- Changed the reconnect strategy to try once every minute, indefinitely.
(ReconnectFailedEvents are thrown on reconnect failures, allowing the app
to track progress if it wants to).

- Close socket events now work with Flex 4.

I can't seem to email you through Google Code (or rather, I should say, I
can't figure out how to do that).  If you have questions for me, I'd love
to work towards getting this patch integrated, and I'll check the comments
here for responses.

Thanks much for a great library!

Original issue reported on code.google.com by mar...@gmail.com on 9 Oct 2009 at 9:55

Attachments:

GoogleCodeExporter commented 8 years ago
Oh btw, this also fixes some instances of those invalid socket operation errors 
that
can possibly occur during reconnection (see issue 2).

Normally those should only happen if one if Stomp.transmit is called when the 
socket
is not connected.

Original comment by mar...@gmail.com on 9 Oct 2009 at 9:57

GoogleCodeExporter commented 8 years ago
Thank you Mark.  I haven't had a chance to take a look in detail yet, but from 
your
description this sounds like I change I have been meaning to make.  So you've 
saved
me some work.  I'll check it out this weekend, run it through some tests, and 
then
most likely go ahead and integrate it.

Thanks again,

Derek

Original comment by dwischu...@gmail.com on 9 Oct 2009 at 10:05

GoogleCodeExporter commented 8 years ago
This issue was closed by revision r17.

Original comment by dwischu...@gmail.com on 11 Oct 2009 at 11:27

GoogleCodeExporter commented 8 years ago
patch approved and committed.  thank you.

Original comment by dwischu...@gmail.com on 11 Oct 2009 at 11:29

GoogleCodeExporter commented 8 years ago
Thanks!

Original comment by mar...@gmail.com on 12 Oct 2009 at 5:25