From 3aae38c1cf358c2a49164ed69e0f0a12a5a6bd67 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Mon, 26 Dec 2011 21:47:23 +0100 Subject: [PATCH] connection::actions(): Close a connection attempting to connect to bad agent id --- connection.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/connection.cc b/connection.cc index 432d373..992c7b1 100644 --- a/connection.cc +++ b/connection.cc @@ -157,6 +157,7 @@ connection::actions(int tick_id, class agent *agent) if (id < 0) { bump_negot: bump(); out_buf.append("\r\n"); + close(fd); } else { class agent *a2 = NULL; for (std::list::iterator ai = agents.begin(); ai != agents.end(); ai++) {