Heartbeat:

- Pass the actual error to the jQuery event 'heartbeat-connection-lost'.
- When in error state, keep trying to connect even when no response is expected until the error is cleared.
See #23216.

git-svn-id: http://core.svn.wordpress.org/trunk@24577 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Ozz 2013-07-05 23:33:47 +00:00
parent 5f19c95249
commit fa2a6b856e
1 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ window.wp = window.wp || {};
if ( trigger && ! self.connectionLost ) {
self.connectionLost = true;
$(document).trigger( 'heartbeat-connection-lost' );
$(document).trigger( 'heartbeat-connection-lost', [error] );
}
} else if ( self.connectionLost ) {
errorcount = 0;
@ -136,7 +136,7 @@ window.wp = window.wp || {};
// If nothing to send (nothing is expecting a response),
// schedule the next tick and bail
if ( empty ) {
if ( empty && ! self.connectionLost ) {
connecting = false;
next();
return;