Thread: recv failed error?

Results 1 to 8 of 8
  1. #1 recv failed error? 
    charlie waffles
    Guest
    how can i fix this? i know it's a TCP timeout, or something related to that.

    Code:
    java.net.SocketException: Software caused connection abort: recv failed
            at java.net.SocketInputStream.socketRead0(Native Method)
            at java.net.SocketInputStream.read(Unknown Source)
            at Client.fillInStream(Client.java:9395)
            at Client.packetProcess(Client.java:17410)
            at PlayerHandler.process(PlayerHandler.java:240)
            at Process.run(Process.java:31)
            at java.lang.Thread.run(Unknown Source)
    here is the fillInStream method (I highlighted line 9395):
    Code:
    	private void fillInStream(int forceRead) throws java.io.IOException {
    		inStream.currentOffset = 0;
    		in.read(inStream.buffer, 0, forceRead);
    	}
    here is packetProcess (i highlighted line 17410:
    Code:
    	public boolean packetProcess() {
    		if (disconnected || destruct || !isActive || playerName == null) {
    			return false;
    		}
    		try {
    			if (in == null) {
    				return false;
    			}
    			int avail = in.available();
    			if (avail == 0) {
    				return false;
    			}
    			if (packetType == -1) {
    				packetType = in.read() & 0xff;
    				if (inStreamDecryption != null) {
    					packetType = packetType - inStreamDecryption.getNextKey() & 0xff;
    				}
    				packetSize = packetSizes[packetType];
    				avail--;
    			}
    			if (packetSize == -1) {
    				if (avail > 0) {
    					packetSize = in.read() & 0xff;
    					avail--;
    				} else {
    					return false;
    				}
    			}
    			if (avail < packetSize) {
    				return false;
    			}
    			fillInStream(packetSize);
    			timeOutCounter = 0;
    			parseIncomingPackets();
    			packetType = -1;
    		} catch (Exception ex) {
    			ex.printStackTrace();
    			disconnected = true;
    		}
    		return true;
    	}
    Reply With Quote  
     

  2. #2  
    charlie waffles
    Guest
    anyone?
    Reply With Quote  
     

  3. #3  
    charlie waffles
    Guest
    bump
    Reply With Quote  
     

  4. #4  
    Super Donator


    Join Date
    Mar 2009
    Age
    28
    Posts
    1,388
    Thanks given
    316
    Thanks received
    408
    Rep Power
    608
    try + catch your packets
    Reply With Quote  
     

  5. #5  
    charlie waffles
    Guest
    Quote Originally Posted by Im Da Baws View Post
    try + catch your packets
    i don't want to mask the problem, i want to fix it.
    Reply With Quote  
     

  6. #6  
    charlie waffles
    Guest
    please someone who knows what they're talking about,
    Reply With Quote  
     

  7. #7  
    Banned

    Join Date
    Jul 2008
    Age
    28
    Posts
    5,827
    Thanks given
    1,301
    Thanks received
    197
    Rep Power
    0
    There is no problem. The client disconnected.
    Reply With Quote  
     

  8. #8  
    charlie waffles
    Guest
    Quote Originally Posted by Colby View Post
    There is no problem. The client disconnected.
    Why is it printing an error then? Also, does anyone know why my server randomly prints "null"? I've fixed most of the nullpointers that have been going on throughout my server, I just cannot find a cause for that.
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •