Results 1 to 2 of 2

Thread: Client/server arch: Application freezes if network interface goes down

  1. #1
    Join Date
    Dec 2011
    Posts
    18
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Client/server arch: Application freezes if network interface goes down

    Hello everyone!

    I have a client app that communicates with a remote database, it runs fine except if the ethernet interface goes down (i.e: eth0) or the wire is removed. I'd like to keep my application responsive in this unfortunate situation.

    I've already implemented some guards; if the remote mysql server goes down, the application continues to run just fine.

    Any help is welcome

    EDIT: my idea so far is to add a flag within my application and test for the presence of the network interface through a "system" call, if it's false, it automatically closes the sql connection
    Last edited by Pluvius; 27th February 2013 at 17:12.

  2. #2
    Join Date
    Dec 2011
    Posts
    18
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Client/server arch: Application freezes if network interface goes down

    Some improvement here:

    Using strace, Ive found out that if the network is down, a request to the database will wait until a connection is established and that's what freezes the app

Similar Threads

  1. Client/server application
    By sali555 in forum Qt Programming
    Replies: 5
    Last Post: 22nd April 2011, 09:55
  2. problem with client/server application
    By marco.stanzani in forum Newbie
    Replies: 1
    Last Post: 9th April 2011, 07:36
  3. TCP server-client application with external access
    By dominate in forum Qt Programming
    Replies: 3
    Last Post: 4th February 2011, 19:18
  4. TCP Client-Server Application
    By Tavit in forum Qt Programming
    Replies: 1
    Last Post: 18th March 2008, 13:20

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.