LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

TCP close leaves connection opened

Solved!
Go to solution

Hello guys,

 

I am using a ethernet connection to query data from 2 sensors acquisition units.

This query is driven by a 30 second period timed loop.  As this rate is quite low, I close the connection and reopen it each time.

I try to connect to the unit through the same 2 ports each time, 50 000 and 50 001. 

 

I Get the error message that the connection is already used while a TCP close connection executed w/o error before.

 

The network tool monitor TCP view gives me the following screen [network_connections.png] when I run w/o specifying the local port. It appears that the previous connection are not closed properlly and are still in TIME_WAIT state. This list is encreasing continuouslly, leading to networks errors. (IP adress for units are 200.0.4.152 and 153)

 

Could you please help me about this?

 

Thank you in advance 🙂

Regards,

 

Brunoclose.pngget_input.pngInit.pngInit.pngMain.pngnetwork_connections.png

0 Kudos
Message 1 of 4
(4,373 Views)
Solution
Accepted by topic author Mechatronic_is_good

Hello,

 

This appears to be a common behaviour:

 

http://digital.ni.com/public.nsf/allkb/119D334B8B78732E862574E1006D1839

 

0 Kudos
Message 2 of 4
(4,359 Views)

30 seconds is not a slow rate for network communication. Why not just leave the connection open? It will save a lot of overhead in addition to solving your error.

0 Kudos
Message 3 of 4
(4,333 Views)

Hi,

 

What if I want to leave TCP open all the time? I'm running continuously.

 

Should I remove TCP Close, or replace with TCP open??? Please help!

0 Kudos
Message 4 of 4
(2,935 Views)