atmosphere icon indicating copy to clipboard operation
atmosphere copied to clipboard

Atmosphere resources with the same uuid

Open hapali opened this issue 13 years ago • 2 comments

If transport is long-polling and you get a list of the suspended resources, you get lots of atmosphere resources with the same uuid.

For the same session id and same broadcaster I have 3 atmosphere resources in this example.

uuid: a93be1e7-908b-d8a9-10bf-1dddfc63cb4c

AtmosphereResourceImpl{ hasCode621810845, action=Action{timeout=-1, type=SUSPEND}, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, asyncSupport=org.atmosphere.container.Tomcat7BIOSupportWithWebSocket@4c3279a9, serializer=null, isInScope=true, useWriter=true, listeners=[]}

AtmosphereResourceImpl{ hasCode595209689, action=Action{timeout=-1, type=SUSPEND}, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, asyncSupport=org.atmosphere.container.Tomcat7BIOSupportWithWebSocket@4c3279a9, serializer=null, isInScope=true, useWriter=true, listeners=[]}

AtmosphereResourceImpl{ hasCode710415297, action=Action{timeout=-1, type=SUSPEND}, broadcaster=org.atmosphere.cpr.DefaultBroadcaster, asyncSupport=org.atmosphere.container.Tomcat7BIOSupportWithWebSocket@4c3279a9, serializer=null, isInScope=true, useWriter=true, listeners=[]}

I have just one tab and connection open! Is this a leak? If I closed firefox but they dont disappear! Steps to reproduce is: keep refreshing firefox I think.

Atmosphere 1.0.5 + tomcat 7.0.33

hapali avatar Dec 13 '12 18:12 hapali

This is expected, the uuid is generated by the server and used between the client and server for the duration of the transactions. Every time a reconnect happens the UUID will be re-used.

jfarcand avatar Dec 13 '12 18:12 jfarcand

Thanks for the quick response!

I understand, but I also expect connections to be cleaned up when the client drops the connection. Is this because I dont suspend with a timeout?

hapali avatar Dec 13 '12 19:12 hapali