title: udp socket stops receiving data
body: <p>I am learning network programing in python and I'm trying to write a Toy vpn forked from android sdk <a href="https://github.com/android/platform_development/tree/master/samples/ToyVpn" rel="nofollow">https://github.com/android/platform_development/tree/master/samples/ToyVpn</a>.</p>
  
  <p>My Toy vpn is <a href="https://github.com/325862401/ToyVPN" rel="nofollow">https://github.com/325862401/ToyVPN</a>.</p>
  
  <p>It's only for Linux.
  My home network is behind NAT.</p>
  
  <p>I can use this vpn to surf the internet after connect to remote sever.
  But about half an hour or some time later the client <code>udp</code> socket stops receiving any data but the server can receive and send normally.
  At this point I must terminate my client and run <code>ToyVpnClient</code> again.
  It works normal for some time until it stop receiving again.</p>
  
  <p>Please help me check the client logs.</p>
  
  <pre><code>&gt;2013-08-24 11:42:38 INFO     receive data from the tunnel timeout`
  </code></pre>
  
  <p>you can see that when problem happens, the socket always sends, not receive.</p>
  
  <p><code>&gt;</code> means <code>send</code>, <code>&lt;</code> means <code>receive</code></p>
  
  <p>I want to know why the <code>udp</code> socket stops receiving data.</p>
  
  <p>Is there any debug method to find the cause?</p>
  
  <p>For now I've just used <code>logging</code> to debug my program.</p>