Skip to content

Commit

Permalink
Fixes #586 Trace of sharing a connection should be removed
Browse files Browse the repository at this point in the history
  • Loading branch information
flowersinthesand committed Sep 8, 2012
1 parent 4ca5fba commit cae71be
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions modules/jquery/src/main/webapp/jquery/jquery.atmosphere.js
Original file line number Diff line number Diff line change
Expand Up @@ -2137,23 +2137,17 @@ jQuery.atmosphere = function() {
_invokeCallback();

_clearState();

// Are we the parent that hold the real connection.
if (_localStorageService == null && _localSocketF != null) {
// Stop sharing a connection
if (_storageService != null) {
// Clears trace timer
clearInterval(_traceTimer);
// Removes the trace
document.cookie = encodeURIComponent(name) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT";
document.cookie = encodeURIComponent("atmosphere-" + _request.url) + "=; expires=Thu, 01 Jan 1970 00:00:00 GMT";
// The heir is the parent unless unloading
_storageService.signal("close", {reason: "", heir: !_abordingConnection ? guid : (_storageService.get("children") || [])[0]});

}

if (_storageService != null) {
_storageService.close();
}


if (_localStorageService != null) {
_localStorageService.close();
}
Expand Down

0 comments on commit cae71be

Please sign in to comment.