Silence warning "Bug: stream (marked at connection_edge.c:2224) sending two socks replies?"
When a client sends an HTTP request to Tor's SocksPort, it results in Tor logging:
Sep 25 16:38:42.830 [warn] {APP} Socks version 72 not recognized. (Tor is not an http proxy.) Sep 25 16:38:42.830 [warn] {BUG} _connection_mark_unattached_ap(): Bug: stream (marked at connection_edge.c:2224) sending two socks replies?
The client only gets a single reply (the Tor is not a HTTP proxy message), so the bug here seems to be that the warning is shown.
I'll attach a patch that silences the warning for me.
Setting socks->has_finished anywhere before calling _connection_mark_unattached_ap() should do, so maybe it should be set earlier.
I'm not entirely sure if the (sockshere == -1) check is necessary.