I start long polling in JavaScript:
getNewMessagesLong();
function getNewMessagesLong() {
$.ajax({
type: 'POST',
url: "listenMessageLong",
dataType: 'json',
success: function(data) {
alert("success: " + data);
}, complete: poll, timeout: 30000 });
};
So how can I stop this polling after start?