version T13.790: memory leak fixed, the program will not fail
-/* dnet: threads; T11.231-T13.789; $DVS:time$ */
+/* dnet: threads; T11.231-T13.790; $DVS:time$ */
#include <stdlib.h>
#include <stdio.h>
@@ -231,6 +231,9 @@ static void *dnet_thread_accepted(void *arg) {
g_n_inbound--;
t->conn.socket = -1;
//pthread_mutex_lock(&t->conn.mutex);
+#ifdef CHEATCOIN
+ if (dnet_connection_close_notify) (*dnet_connection_close_notify)(&t->conn);
+#endif
t->to_remove = 1;
//pthread_mutex_unlock(&t->conn.mutex);
return 0;
