Skip to content

Instantly share code, notes, and snippets.

@mazieres
mazieres / zb-data_collect.js
Created October 29, 2016 12:55
Zeitgeist Borders - Data Collection
function mkAllQueries(query) {
var allRes = {}
var promises = []
for (var i = 0; i < nb_hls; i++){
promises.push($.getJSON(apiUrl, {
"client": "firefox",
"hl": hls[i],
"q": query
})
.done(function (hl, q) {
From 4d80c2dc876e7bffde2b23825587518c4bd7b678 Mon Sep 17 00:00:00 2001
From: Michael Stillwell <[email protected]>
Date: Thu, 10 Mar 2011 23:23:12 +0000
Subject: [PATCH] Only emit error on request if request can be found.
If the socket receives a "ECONNRESET, Connection reset by peer" error, the http error handler tries to find the associated request from the request queue. However at this point in time, all requests may have been satisfied (e.g. by other sockets) and the queue empty.
---
lib/http.js | 15 +++------------
1 files changed, 3 insertions(+), 12 deletions(-)