Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Close connections on suspend/resume
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ranger719
Tux's lil' helper
Tux's lil' helper


Joined: 16 May 2006
Posts: 92
Location: Germany

PostPosted: Fri Aug 03, 2007 5:58 pm    Post subject: Close connections on suspend/resume Reply with quote

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
View user's profile Send private message
xalan
Apprentice
Apprentice


Joined: 01 Feb 2005
Posts: 190

PostPosted: Fri Aug 03, 2007 7:08 pm    Post subject: Reply with quote

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
View user's profile Send private message
ranger719
Tux's lil' helper
Tux's lil' helper


Joined: 16 May 2006
Posts: 92
Location: Germany

PostPosted: Fri Aug 03, 2007 11:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum