Commit 343b1398 authored by Benjamin Fischer's avatar Benjamin Fischer
Browse files

PollSocket: only accept json responses

this fixes a problem when the session was reset and the poll socket url
was redirected to the login page which was then served as the "response"
to the ajax callback which caused infinit poll socket reloads without
delay - this is one of the causes of high server load
parent ea9f1585
......@@ -252,6 +252,7 @@ define(["jquery", "emitter"], function($, Emitter) {
url : this.options.pollUrl,
type: this.options.pollMethod,
data: allParams.length ? paramsToObject(allParams.join("&")) : {},
dataType: "json",
}).always(function() {
}).done(function(response) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment