TCP Close Connection VI Closes Connection Slowly After Client Disconnect

Updated Jan 3, 2019

Reported In

Software

  • LabVIEW

Issue Details

I have devices connecting to LabVIEW over TCP. One of the devices may inappropriately close its TCP connection early. In this case, the TCP Close Connection VI takes a very long time to run, almost 30 seconds. How do I shorten the time it takes to run this VI and disconnect from the client?

Solution

Ensure that the timeout on your TCP Read VI before the TCP Close Connection VI is sufficiently short. If that timeout is long, it may be taking a long time within that VI trying to communicate with a non-existent client.

Additional Information

The TCP Read VI's timeout defaults to 25 seconds. If a shorter timeout is desired, you have to wire a number to the timeout terminal on the TCP Read VI.

WAS THIS ARTICLE HELPFUL?

Not Helpful