title: Java error - Software caused connection abort: recv failed
body: <p>The full error is:</p>
  
  <pre><code>java.net.SocketException: Software caused connection abort: recv failed
      at java.net.SocketInputStream.socketRead0(Native Method)
      at java.net.SocketInputStream.read(SocketInputStream.java:168)
      at java.net.SocketInputStream.read(SocketInputStream.java:121)
      at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:283)
      at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:325)
      at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:177)
      at java.io.InputStreamReader.read(InputStreamReader.java:184)
      at java.io.BufferedReader.fill(BufferedReader.java:154)
      at java.io.BufferedReader.readLine(BufferedReader.java:317)
      at java.io.BufferedReader.readLine(BufferedReader.java:382)
      at chat.run(chat.java:76)
      at java.lang.Thread.run(Thread.java:722)
  </code></pre>
  
  <p>"at chat.run(chat.java:76)" is this line:</p>
  
  <pre><code>System.out.println("[_in_"+(line=ins.readLine())+"_]");
  </code></pre>
  
  <p>line being a string and ins being a BufferedReader</p>
  
  <pre><code>ins = new BufferedReader(new InputStreamReader(_sock.getInputStream()));
  </code></pre>
  
  <p>_sock being</p>
  
  <pre><code>Socket       _sock      = null;
  _sock = serv_sock.accept();
  </code></pre>
  
  <p>This happends on my Server java and not on my client java...
  Also, this happends when I dont send anything for a little while</p>
  
  <p>-----EDIT------</p>
  
  <p>I tried it again;
  First it went 40 minutes of doing nothing and it still worked,
  then I waited 40 minutes again and this time it didn't work.</p>
  
  <p>It seems to be kind of random..
  I can't figure out what's causing it.</p>
  
  <p>The files I have are
  * [client.java], [chat.java], [vlc.java]
  * [server.java], [chat.java], [vlc.java]</p>
  
  <p>the vlc files are the same in both although chat is different
  (since I havn't done Threads in both client and server yet) </p>
  
  <p>Here's the code;</p>
  
  <pre><code>   SERVER
  server.java: pastebin.com/GH8ShcGp
  chat.java  : pastebin.com/iaL23kSb
  vlc.java   : pastebin.com/9kyrbh5q
  
  
  
      CLIENT
  client.java: pastebin.com/HDK450Jg
  chat.java  : pastebin.com/CfHrEUkE
  vlc.java   : pastebin.com/SfZgYy58
  </code></pre>
  
  <hr>
  
  <p>I think it's a window/network thing.
  Someone who please can help me fix this??</p>