Close the other end of the connection too.
authorThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Fri, 3 Jul 2009 19:58:27 +0000 (16:58 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@holoscopio.com>
Fri, 3 Jul 2009 19:58:27 +0000 (16:58 -0300)
When the proxy is the one to close the connection, it should close both
ends, since there will be no event indicating one of the ends was
closed.

pop.c

diff --git a/pop.c b/pop.c
index 0477815..357a394 100644 (file)
--- a/pop.c
+++ b/pop.c
@@ -91,6 +91,7 @@ pop_read (net_hook_t *hook, gchar *buffer, size_t len)
             {
               g_message ("Denying access to user %s.", pop->user);
               pop_destroy (hook);
+              hc_conn_close (hook->peer->conn);
               hc_conn_close (hook->conn);
               return;
             }