diff --git a/Project/applications/smartcities/httpClient.c b/Project/applications/smartcities/httpClient.c index c5d6e69..942828f 100644 --- a/Project/applications/smartcities/httpClient.c +++ b/Project/applications/smartcities/httpClient.c @@ -102,6 +102,7 @@ int httpRequest(struct httpHeaders head, char* content, int content_size) //neocon->recv_timeout = 5000; // for 5s connection_ok = netconn_recv(neocon, &netBufs); printf("res recv= %d\r\n",connection_ok); + netconn_close(neocon); } // Manage Response 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) int http_response = response2int(response); // alliberem Mandela i Willy - netconn_close(neocon); netconn_delete(neocon); chHeapFree(response);