comparison blog.js @ 9:42d3f454d4b4

Don’t reconnect when there is nothing to get.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Wed, 02 Nov 2011 09:53:37 -0700
parents 7ab6b48122af
children 161d4ea1c3f8
comparison
equal deleted inserted replaced
8:461a24a5a788 9:42d3f454d4b4
173 173
174 var onSubscribed = function(stanza) { 174 var onSubscribed = function(stanza) {
175 var type = stanza.getAttribute('type'); 175 var type = stanza.getAttribute('type');
176 if (type !== 'result') { 176 if (type !== 'result') {
177 messages.innerHTML = 'Error, impossible to retrieve messages.'; 177 messages.innerHTML = 'Error, impossible to retrieve messages.';
178 re = false;
178 conn.disconnect(); 179 conn.disconnect();
179 } 180 }
180 } 181 }
181 182
182 function onConnect(status) { 183 function onConnect(status) {