Browse Source

fix(pubsub): Performance of subscriber server

 - Socket timeout should not be 300ms as it waits for a packet
   for about 300ms and stop the other resources
 - Reduced the timeout to 1ms as subscribe callback timer
   running at 5ms

Change-Id: If75f586555b864720a4bacf603029612c783bea2
Suriya Narayanan Parthasarathi Vimala 5 years ago
parent
commit
a882beb240
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/pubsub/ua_pubsub_reader.c

+ 1 - 1
src/pubsub/ua_pubsub_reader.c

@@ -287,7 +287,7 @@ void UA_ReaderGroup_subscribeCallback(UA_Server *server, UA_ReaderGroup *readerG
         return;
     }
 
-    connection->channel->receive(connection->channel, &buffer, NULL, 300000);
+    connection->channel->receive(connection->channel, &buffer, NULL, 1000);
     if(buffer.length > 0) {
         UA_LOG_INFO(&server->config.logger, UA_LOGCATEGORY_USERLAND, "Message received:");
         UA_NetworkMessage currentNetworkMessage;