Close connection when flush fails

proxy.ServerConnection.terminate should (try to) close its connection when the flush fails.