mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-26 14:49:10 -04:00
Oops we need to use SocketException instead of IOException now.
This commit is contained in:
parent
0936dd7e50
commit
bd1f2c9597
@ -76,7 +76,7 @@ namespace ClassicalSharp.Network {
|
||||
|
||||
try {
|
||||
reader.ReadPendingData();
|
||||
} catch( IOException ex ) {
|
||||
} catch( SocketException ex ) {
|
||||
ErrorHandler.LogError( "reading packets", ex );
|
||||
game.Disconnect( "&eLost connection to the server", "I/O error when reading packets" );
|
||||
Dispose();
|
||||
@ -129,7 +129,7 @@ namespace ClassicalSharp.Network {
|
||||
}
|
||||
try {
|
||||
writer.Send();
|
||||
} catch( IOException ) {
|
||||
} catch( SocketException ) {
|
||||
// NOTE: Not immediately disconnecting, as otherwise we sometimes miss out on kick messages
|
||||
writer.index = 0;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user