close the connection from the destroy routine
authorDaniel Kouřil <kouril@ics.muni.cz>
Thu, 8 Dec 2011 10:39:41 +0000 (10:39 +0000)
committerDaniel Kouřil <kouril@ics.muni.cz>
Thu, 8 Dec 2011 10:39:41 +0000 (10:39 +0000)
emi.canl.canl-c/src/canl.c

index 2058ffd..c3e069b 100644 (file)
@@ -302,6 +302,8 @@ int canl_io_destroy(canl_ctx cc, canl_io_handler io)
     if (!io_cc)
        return set_error(glb_cc, EINVAL, posix_error,  "Invalid io handler");
 
+    canl_io_close(cc, io);
+
     io_destroy(glb_cc, io_cc);
     free (io_cc);