SendThread and ReadThread exception handling.

This commit is contained in:
MobiusDevelopment
2023-06-29 00:08:59 +03:00
parent 6793c515d7
commit e00b9ecf2d
62 changed files with 62 additions and 155 deletions

View File

@ -1,7 +1,6 @@
package org.l2jmobius.commons.network;
import java.io.InputStream;
import java.net.SocketTimeoutException;
import java.util.Set;
/**
@ -204,10 +203,6 @@ public class ReadThread<E extends NetClient> implements Runnable
}
}
}
catch (SocketTimeoutException e)
{
onDisconnection(client);
}
catch (Exception e) // Unexpected disconnection?
{
onDisconnection(client);

View File

@ -78,6 +78,8 @@ public class SendThread<E extends NetClient> implements Runnable
}
catch (Exception ignored)
{
_pool.remove(client);
client.onDisconnection();
}
}