disconnectfromServer: fix socket fd validity condition 00/157400/2
authorJaroslaw Pelczar <j.pelczar@samsung.com>
Tue, 24 Oct 2017 09:12:33 +0000 (11:12 +0200)
committerLukasz Kostyra <l.kostyra@samsung.com>
Tue, 24 Oct 2017 10:43:01 +0000 (12:43 +0200)
Change-Id: I71e566e7c791cc5dd10724210a477a20f88ba5ad
Signed-off-by: Jaroslaw Pelczar <j.pelczar@samsung.com>
TEECLib/src/teec_connection.c

index af623ea..5f51621 100644 (file)
@@ -86,7 +86,7 @@ void disconnectfromServer(int32_t serverSocket) {
        int32_t result;
        LOGD(TEEC_LIB, "Entry");
 
-       if (serverSocket > 0) {
+       if (serverSocket >= 0) {
                // shutdown the socket
                result = shutdown(serverSocket, SHUT_WR);
                if (result != 0)