Commit 0dc0623dca06a0a80d9dbd08c1a69768286485d9

Authored by Ferràn Quer i Guerrero
1 parent 509e4cbf

--no commit message

Project/applications/smartcities/httpClient.c
@@ -102,6 +102,7 @@ int httpRequest(struct httpHeaders head, char* content, int content_size) @@ -102,6 +102,7 @@ int httpRequest(struct httpHeaders head, char* content, int content_size)
102 //neocon->recv_timeout = 5000; // for 5s 102 //neocon->recv_timeout = 5000; // for 5s
103 connection_ok = netconn_recv(neocon, &netBufs); 103 connection_ok = netconn_recv(neocon, &netBufs);
104 printf("res recv= %d\r\n",connection_ok); 104 printf("res recv= %d\r\n",connection_ok);
  105 + netconn_close(neocon);
105 } 106 }
106 // Manage Response 107 // Manage Response
107 printf("httpRequest: Response received. Let's parse the information\r\n"); 108 printf("httpRequest: Response received. Let's parse the information\r\n");
@@ -111,7 +112,6 @@ int httpRequest(struct httpHeaders head, char* content, int content_size) @@ -111,7 +112,6 @@ int httpRequest(struct httpHeaders head, char* content, int content_size)
111 int http_response = response2int(response); 112 int http_response = response2int(response);
112 113
113 // alliberem Mandela i Willy 114 // alliberem Mandela i Willy
114 - netconn_close(neocon);  
115 netconn_delete(neocon); 115 netconn_delete(neocon);
116 chHeapFree(response); 116 chHeapFree(response);
117 117