View previous topic :: View next topic |
Author |
Message |
ranger719 Tux's lil' helper
Joined: 16 May 2006 Posts: 92 Location: Germany
|
Posted: Fri Aug 03, 2007 5:58 pm Post subject: Close connections on suspend/resume |
|
|
Hi,
I am using kmail to connect check my mails via imap. This works fine. When I leave my machine for some time normaly put it to sleep (s2r, S3). When I resume it kmail is unable to use any imap-account because the old connection survives the suspend-cycle and is dead, but hangs since no more packets will be received. This is very annoying. Setting the tcp-established-timeout too low will work for my imap-problem, but then many other problems occur (icq, jabber and so on....).
I read about tcpkill and cutter, but both programs are not really a solution. Cutter only works on routers/firewalls (Is this correct?) and tcpkill (part of dsniff) works, but it works in an endless loop (I can not stop the programm except strg+c). I could write a script which kills the process after some seconds, but isn't there a simple and clean way to do this?
Thanks |
|
Back to top |
|
|
xalan Apprentice
Joined: 01 Feb 2005 Posts: 190
|
Posted: Fri Aug 03, 2007 7:08 pm Post subject: |
|
|
It might be overkill but did you try to shutdown your net.eth0 or equivalent on suspend and bring it up on resume? If it is a problem with kmail, can you afford to close kmail and restart it on resume. You can encapsulate those actions in script. Or you can see if suspend scripts enable you to close/start applications. |
|
Back to top |
|
|
ranger719 Tux's lil' helper
Joined: 16 May 2006 Posts: 92 Location: Germany
|
Posted: Fri Aug 03, 2007 11:38 pm Post subject: |
|
|
I thought about it. But there's a problem. I suspend my machine via the kpowersave-menu. I already have a script which is executed when the systems goes to the suspend state. Problem: It is too slow. I only do 2 dcop-instructions (disconnect kopete and stop amarok) and even at least the second is executed after the machine is resumed. I dont believe that kmail will be fast enough to shut down. |
|
Back to top |
|
|
|