google/nogotofail — pull request #56 by chadbrubaker (2014-12-18 23:55:05+00:00)
Title: Make blame queries nonblocking.

Previously blame queries were done blocking the connection thread, this
caused a big hit in performance when blaming a lot of connections. Now
get_applications and vuln_notify are async and take callbacks. Currently
connections still block until the blame info has come back(but not the
thread).

Also remove the threading in server/blame server. Since everything is
select based move to a single select loop over all the sockets we care
about (nogotofail.mitm.looper.Looper).

Because of the timing of blaming and handler events some events may be
called before the blame result comes back. Currently we block actually
using the connection until the blame result comes back so on_establish
and everything after that has the blame info. on_select no longer does
however.

Currently the blame client is only queried at the start of a connection,
so if the client shows up after the connection starts it wont get
blamed. Will fix this regression in a follow up commit.

Fixes #40