Browse Source

check for select returning 0 (fix #999)

Julius Pfrommer 7 years ago
parent
commit
0ee61ba3e3
1 changed files with 1 additions and 1 deletions
  1. 1 1
      plugins/ua_network_tcp.c

+ 1 - 1
plugins/ua_network_tcp.c

@@ -448,7 +448,7 @@ ServerNetworkLayerTCP_getJobs(UA_ServerNetworkLayer *nl, UA_Job **jobs, UA_UInt1
     setFDSet(layer, &errset);
     struct timeval tmptv = {0, timeout * 1000};
     UA_Int32 resultsize = select(highestfd+1, &fdset, NULL, &errset, &tmptv);
-    if(resultsize < 0) {
+    if(resultsize <= 0) {
         *jobs = NULL;
         return 0;
     }