How to prevent a TCP connection being closed when the VI that opened it finishes.

Hello everyone.
I am developing an application based around servers and clients communicating over TCP in LabVIEW 2012.
When the server/client opens a TCP connection ,it launches an asynchronosly running "connection handler", to which it passes the connection reference which then takes over all the communcation. This all works fine.
However - I have a situation where a client's connection handler can be informed of another "new" server. I would like it to open the connection (to see if it is still valid) and then pass this connection reference back to the client's main code to spawn a new connection handler. This prevents me locking up the Client's main code with a long-ish timeout if the "new" server is not actually accepting connections.
The issue is that if the connection handler that opened up the connection to the "new" server is stopped, then it appears to destroy the reference that it opened. This means that the other connection handler that was merrily communcating with the "new" server has its TCP communciations closed (I get an Error code 1 on a write).
I have created an example to demonstrate the issue which should be used as follows:
1. Run server.vi - it will listen for a connection on the port specifed on its BD.
2. Run CH Launcher.vi - it will open a connection to the server and pass the TCP reference to an instance of Connection Handler.vi which it launches.
3. The Connection Handler should send data to the Server
4. Stop the CH Launcher.vi
5. The Connection Handler.vi will error.
Any suggestions would be much appreciated.
Cheers
John
Solved!
Go to Solution.
Attachments:
TCP Test.zip ‏35 KB

John_Neutron escreveu:
In my case I have changes the part of the code that opens the TCP connection to a VI that has the same lifetime as the main VI so that any connections that have been opened will only be closed automatically when the main VI stops.
And what are the effects? You are still facing the same problem or closing the connection only when the whole applicaton stops solved your problem?
Regards
Mondoni

Similar Messages

  • How to prevent ipad apps from being stored in the iCloud and how to bring them back to the iPad

    I have an iPad Mini Retina with 128GB of storage.  I purchased about a dozen apps and it gets stored in the iCloud and I don't know how to access them on the cloud storage.  Plus I have many apps from me itouch that I use and they are also stored on the iCloud. 
    How can I prevent further apps that I buy from gettting transfer to the iCloud?
    How can I download my existing apps that I purchase and that are from my itouch that are stored in the iCloud into my iPad?
    How do I access my iCloud storage from my iPad?
    Thanks.

    You make it sound like apps are disappearing from your iPad and uploading to iCloud. That's not how it works. Maybe somebody (or you) deleted the apps and you don't realize it.
    You cannot prevent apps from being stored in iCloud. That is one of the reasons for using iCloud. It will store all of your purchased apps and you will be able to download them if you delete them, or if you buy another device that you want to use the apps on.
    If you have apps that are in iCloud, just go to the Purchased Tab in the app store, tap on the Not on this iPad button at the top. Look for any of the apps that you want to download and then tap the cloud icon in order to download them to the iPad. You access your iCloud storage in the purchased tabs of the different stores or in the apps themselves. Any data that is being backed up in iCloud is on the device in the corresponding apps and you don't need to access that data in iCloud. It's at your fingertips already,
    Purchased apps do NOT count against your iCloud storage. If you have 60GB of apps, they do not take up the alloted 5GB of free storage that you get. The app data would count against the storage but not the apps themselves.

  • Anyone know how to keep a child Process from closing when the main Applicaiton is closed

      I have a Web based application that needs to use an older version of Java to run it properly . I have been able to sequence this and use a shortcut to call on Iexplorer.exe to open the browser in bubble and have the old version of Java run in the
    same bubble. This part is working as needed but the issue I have ran into is when a end user opens up a word document from a link  and "check's it out" to modify it and closes the browser it immediately closes the word document along
    with it. So the Question I have, Is there a way to keep a child process open when the main Application is closed . Anyone run into anything similar or any documentation on a way to keep the process alive until the end user closes it?

    Hi There,
    I don't believe there is a way to handle this currently within App-V...Other virtualization products do have the ability to exclude processes and force to run outside or the bubble or exclude them from terminating on shutdown.
    It would be a great feature request for a future release. You can easily request it here:
    http://appv.uservoice.com/forums/280448-microsoft-application-virtualization
    PLEASE MARK ANY ANSWERS TO HELP OTHERS Blog:
    rorymon.com Twitter: @Rorymon

  • [Flex 4.5.1] How to prevent Radio Button from being selected when clicked on? No Changing Event?

    I have a very common use case where you have a few radio buttons and only one can be selected at a time. Some of them are basic and on click should be selected right away, but other are more complex and open a pop up which requires some additional user selections after which the user selected OK or CANCEL for example and only after that the selection of the radio button should be applied programatically.
    So to solve this issue I've come up with 2 workarounds:
    1) make the entire group, that holds the radio button, act as a button with buttonMode="true" mouseChildren="false" and programatically change the radio button within it.
    2) hold the current radio button selection in a variable and in the changeHandler of that radio button return the selection back to what was selected before. But this also causes a small flickering of the radio button which gets selected and deselected immediately after that.. not cool.
    So my question is... is there something I am missing that could do the job without these workarounds... like a Changing event which I use for the ButtonBar but I can't find on the RadioButton or RadioButtonGroup... thanks!

    Hi,thanks for the reply. Actually that was my third option, but not sure if it's very good also..
    Here is a simple scenario:
    User must select between 2 radio buttons:
    1) no volume -> sets variable volume=0 and selects the radio button (that is the normal use case)
    2) set volume -> opens up a pop up with a list that has a X button to close and 4 options: 25% volume, 50% volume, 75%, 100%
    At this point the set volume radio button should not be selected and the user has 2 choices:
    -> hit the X button to close - nothing changes and no volume radio button is still selected and volume is still = 0
    -> hit one of the volume % buttons -> the set volume radio button gets selected and the variable volume=25/50/75/100 depending on the button selected by the user.
    That's a pretty common scenario and it's bugging me that I can't easily alter the radio button selection logic since whenever I click it, it gets selected and I can't put a logic in between in a standard way. This should apply to any component with selection, just like ButtonBar has it with the Changing event.
    So is there any other more convenient way to accomplish this scenario that you could recommend?
    Thanks!

  • Usually, Firefox closes when closing the last tab on it. Now it doesn't. How do I change it back to closing when the last tab is closed?

    I've checked my about:config settings beforehand since I hear the setting for this is usually in there. It's still the same and hasn't been changed. As far as I know, I haven't downloaded any add-ons recently that would cause this change. None have been installed recently. Here's a screenshot of the about:config.

    Did you try Safe Mode?
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • How can I change my iCloud email address when the account that is attached to my iCloud right now does not exist. I tried to delete the account attached to my iCloud on my iPhone but it requires a password. The password I type in does not work because I h

    help please

    If the old ID ("email address") is your ID, and if your new ID was created by editing the details of this old ID (rather than being an entirely new ID), go to https://appleid.apple.com, click Manage my Apple ID and sign in with your current iCloud ID.  Click edit next to the primary email account, change it back to your old email address and save the change.  Then edit the name of the account to change it back to your old email address.  You can now use your current password to turn off Find My iDevice, even though it prompts you for the password for your old account ID. Then save any photo stream photos that you wish to keep to your camera roll.  When finished go to Settings>iCloud, tap Delete Account and choose Delete from My iDevice when prompted (your iCloud data will still be in iCloud).  Next, go back to https://appleid.apple.com and change your primary email address and iCloud ID name back to the way it was.  Now you can go to Settings>iCloud and sign in with your current iCloud ID and password.

  • How can i do to make the iPod play the next album when the albums that it's playing finish?

    How can i do to make the ipod play the next album when the album that is playing finish? because when tha album that i'm listening to is over ihave to select another, and i want to listen all the albums continuously
    Thanks

    To change the iCloud ID you have to go to Settings>iCloud, tap Delete Account, then sign back in with the other ID.  When you delete the account it will prompt you about what to do with the iCloud data.  If you need to migrate it and merge it with the data in the new account choose Keep on My iDevice; then choose Merge to upload the data and merge it with the new account.  If your data is already in the other account and you don't need to migrate it to the other account, choose Delete from My iDevice.

  • How can I prevent my fullscreen app from closing when escape is pressed in Cocoa-Applescript?

    How can I prevent my fullscreen Cocoa-Applescript app from being closed when a user presses escape?

    Actually, in testing something else with Thunderbird as the receiving email client, I found that blanks in the Full Name entry box works when the recipient does not have a history with you. My earlier tests were from one account to another of my accounts, but viewing the received message in Mail. Mail knew the address so added the Full Name from history. The Thunderbird I was testing another issue with, was a virgin installation, and had the same recipient account, but not the sending one, setup. In Thunderbird only the actual email address came in, and no name.
    Ernie

  • HT1349 Itunes closed when the two movies I purchased were being downloaded. When I reopened Itunes, my money remained the same after I purchased them, but the movies were gone. How do I get them back?

    Itunes closed when the two movies I purchased were being downloaded. When I reopened Itunes, my money remained the same after I purchased them, but the movies were gone. How do I get them back without having to rebuy them?

    If they did not download, then clikc Store>Check for Available Downloads

  • SQL Service Broker 2012: the connection was closed by the remote end, or an error occurred while receiving data: '64(The specified network name is no longer available.)'

    Anyone can help with the below issue please? Much appreciated.
    We have about 2k+ messages in sys.transmission_queue
    Telnet to the ports 4022 is working fine.
    Network connectivity has been ruled out.
    The firewalls are OFF.
    We also explicitly provided the permissions to the service account on Server A and Server B to the Service broker end points.
    GRANT
    CONNECT ON
    ENDPOINT <broker> <domain\serviceaccount>
    Currently for troubleshooting purposes, the DR node is also out of the Availability Group, which means that we right now have only one replica the server is now a traditional cluster.
    Important thing to note is when a SQL Server service is restarted, all the messages in the sys.transmission queue is cleared immediately. After about 30-40 minutes, the errors are continued to be seen with the below
    The
    connection was
    closed by the
    remote end,
    or an
    error occurred while
    receiving data:
    '64(The specified network name is no longer available.)'

    We were able to narrow down the issue to an irrelevant IP coming into play during the data transfer. We tried ssbdiagnose runtime and found this error:
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
    C:\Windows\system32>SSBDIAGNOSE -E RUNTIME -ID 54F03D35-1A94-48D2-8144-5A9D24B24520 Connect to -S <SourceServer> -d <SourceDB> Connect To -S <DestinationServer> -d <DestinationDB>
    Microsoft SQL Server 11.0.2100.60
    Service Broker Diagnostic Utility
    An internal exception occurred: Timeout expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
    P  29830                                 Could not find the connection to the SQL Server that
    corresponds to the routing address tcp://XX.XXX.XXX.199:4022. Ensure the tool is connected to this server to allow investigation of runtime events
    The IP that corresponds to routing address is no where configured within the SSB. We are yet unsure why this IP is being referred despite not being configured anywhere. We identified that this IP belongs to one of nodes other SQL Server cluster, which has
    no direct relation to the source server. We failed over that irrelevant SQL Server cluster and made another node active and to our surprise, the data from sys.transmission_queue started flowing. Even today we are able to reproduce the issue, if we bring
    back this node [XX.XXX.XXX.199] as active. Since, its a high business activity period, we are not investigating further until we get an approved downtime to find the root cause of it.
    When we get a approved downtime, we will bring the node [XX.XXX.XXX.199] as active and we will be running Network Monitor, Process Monitor and the SSB Diagnose all in parallel to capture the process/program that is accessing the irrelevant IP.
    Once, we are able to nail down the root cause, I will share more information.

  • Q10 Serious problem-Edit account-Not all the Connections were closed in the alloted time.

    hello, when my Q10 work account isn't responding ,its ask me to "tap for more info" , i go to "System Setting" - Accounts --Set up email --select my work account email address (show "Not Connected) -- "Edit Account" -Configure the account settings for- always in red font :  -Not All Connections were closed in the alloted time. no matter how I change server address, port and smtp server address , SSL..etc..finally solve is to keep delete my work email account and re-install. this is happen on my own work email address account. i have another recruit email work account with same company domain name. but never have this problem. hotmail, yahoo doesnt happen also. may anyone can help ? or only solution is to keep delete and re-install. fyi., this is my second Q10 used 4 mths back. 2st Q10 doesnt happen for all work and personal mail account.Thanks alot.

    hello, when my Q10 work account isn't responding ,its ask me to "tap for more info" , i go to "System Setting" - Accounts --Set up email --select my work account email address (show "Not Connected) -- "Edit Account" -Configure the account settings for- always in red font :  -Not All Connections were closed in the alloted time. no matter how I change server address, port and smtp server address , SSL..etc..finally solve is to keep delete my work email account and re-install. this is happen on my own work email address account. i have another recruit email work account with same company domain name. but never have this problem. hotmail, yahoo doesnt happen also. may anyone can help ? or only solution is to keep delete and re-install. fyi., this is my second Q10 used 4 mths back. 2st Q10 doesnt happen for all work and personal mail account.Thanks alot.

  • When I try to open a pdf link in my browser I am asked where I want to save the file.  I used to be asked if I wanted to open the file.  How do I get back to being asked if I want to open rather than save?

    When I try to open a pdf link in my browser I am asked where I want to save the file.  I used to be asked if I wanted to open the file.  How do I get back to being asked if I want to open rather than save?

    What browser?

  • How to prevent Oracle from using an index when joining two tables ...

    How to prevent Oracle from using an index when joining two tables to get an inline view which is used in an update statement?
    O.K. I think I have to explain what I mean:
    When joining two tables which have many entries sometimes it es better not to use an index on the column used as join criteria.
    I have two tables: table A and table B.
    Table A has 4.000.000 entries and table B has 700.000 entries.
    I have a join of both tables with a numeric column as join criteria.
    There is an index on this column in table A.
    So I instead of
      where (A.col = B.col)I want to use
      where (A.col+0 = B.col)in order to prevent Oracle from using the index.
    When I use the join in a select statement it works.
    But when I use the join as inline view in an update statement I get the error ORA-01779.
    When I remove the "+0" the update statement works. (The column col is unique in table B).
    Any ideas why this happens?
    Thank you very much in advance for any help.
    Regards Hartmut

    I think you should post an properly formatted explain plan output using DBMS_XPLAN.DISPLAY including the "Predicate Information" section below the plan to provide more details regarding your query resp. update statement. Please use the \[code\] and \[code\] tags to enhance readability of the output provided:
    In SQL*Plus:
    SET LINESIZE 130
    EXPLAIN PLAN FOR <your statement>;
    SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY);Usually if you're using the CBO (cost based optimizer) and have reasonable statistics gathered on the database objects used the optimizer should be able to determine if it is better to use the existing index or not.
    Things look different if you don't have statistics, you have outdated/wrong statistics or deliberately still use the RBO (rule based optimizer). In this case you would have to use other means to prevent the index usage, the most obvious would be the already mentioned NO_INDEX or FULL hint.
    But I strongly recommend to check in first place why the optimizer apparently seems to choose an inappropriate index access path.
    Regards,
    Randolf
    Oracle related stuff:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle:
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • How do I keep McAfee from being downloaded when I update Acrobat?

    How do I keep McAfee from being downloaded when I update Acrobat?  I'm being spamed by Acrobat!

    If you are talking about this proble, the answer is in the thread:
    http://forums.adobe.com/thread/1065811?tstart=120

  • WSUS sync fails with "Webexception the underlying connection was closed. The connection was closed unexpectedly"

    While I have my WSUS integrated with SCCM. I think this error has nothing to do with SCCM, so I put it here in the WSUS forum. On one of my networks, the nightly WSUS sync worked until two weeks ago. I've made no progress in fixing it. Ocassionally it'll
    say the sync was successful (about 1 in 15 attempts). I keep getting "WebException: The underlying connection was closed. The connection was closed unexpectedly. at System.WebServices.Protocols.WebClientProtocol.GetWebResponse(WebRequest
    request) at System.WebServices.Protocols.GetWebResponse(WebRequest request) at MicroSoft.UpdateServices.ServerSync.ServerSyncCompressionProxy.GetWebResponse(WebRequest webrequest) at System.Web.Services.Protocols.SoapHttpClientProtocol.(Invoke StringMethodName,Object[]
    Parameters) at Microsoft.UpdateServices.ServerSync.ServerSyncWebServices.ServerSync.ServerSyncProxy.GetRevisionIdList(Cookie cookie, ServerSyncFilter filter) at Microsoft.Update.Services.ServerSync.CatalogSyncAgentCore.WebserviceGetRevisionIdList(ServerSyncFilter
    filter, Boolean isConfigData), at Microsoft.UpdateServices.ServerSync.CatalogSyncAgentCore.SyncConfigUpdatesfromUSS() at Microsoft.UpdateServices.ServerSync.CatalogSyncAgentCore.ExecuteSyncProtocol(Boolean allowRedirect)"
    Our enterprise has it's own WSUS server we have to sync from. The problem may be at that end, not mine. A sync will start and will fail about 4 minutes later. Our network guy watched the traffic leave our compound but saw only a trickle of traffic coming
    back. Any ideas?
    Ben JohnsonWY

    Hi,
    Please try this fix below first:
    FIX: Intermittent "Underlying connection was closed" error message when you call a Web service from ASP.NET
    http://support.microsoft.com/kb/819450
    I guess you are maintaining a downstream server. If it isn’t a replica server, please try to sync with Microsoft update.
    Hope this helps.

Maybe you are looking for

  • Mac Mini Doesn't Display through Philips Tube HDTV

    I have a Philips tube HDTV with a VGA connector in the back, and used the DVI-VGA connector that came with my new Mac Mini to connect. I don't have a computer monitor at home. The TV doesn't display anything. So then I took the Mac Mini over to a fri

  • Workflow Mailer HTML

    Hello, We are using the Workflow Mailer with Outlook '98 (to send mail) and Outlook Express (to receive mail). We have selected the 'HTML Mail' delivery. When we look at the sent and received messages, we see the HTML code in the mail, and an attachm

  • Query's log viewer

    Hello, I'm trying from inside session management to view query's log but I get this Error Log Could Not Be Retrieved Odbc driver returned an error (SQLExecDirectW). Error Details Error Codes: OPR4ONWY:U9IM8TAC State: HY000. Code: 10058. [NQODBC] [SQL

  • Problem viewing video in Itunes

    Since installing Snow Leopard I cannot view video on full screen in Itunes. When I chose the full screen option the Itunes window disappears but the video display is very small in the center of my screen,

  • Manifest in jars

    ok Im trying to make an executable jar for my program, but I cant figure out how to make the manifest file.. also, once I do that, what do I do to make it run?