close() not fclose()
authorMarcel Poul <marcel.poul@cern.ch>
Tue, 6 Dec 2011 12:41:17 +0000 (12:41 +0000)
committerMarcel Poul <marcel.poul@cern.ch>
Tue, 6 Dec 2011 12:41:17 +0000 (12:41 +0000)
emi.canl.canl-c/src/canl.c

index 2893545..23c189b 100644 (file)
@@ -366,8 +366,8 @@ static void io_destroy(glb_ctx *cc, io_handler *io)
         io_cc->s_addr = NULL;
     }
     if (io_cc->sock) {
-        fclose (io_cc->sock);
-        io_cc->sock = NULL;
+        close (io_cc->sock);
+        io_cc->sock = 0;
     }
     if (io_cc->s_ctx) {
         /*TODO maybe new function because of BIO_free and SSL_free*/