mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-27 15:29:36 -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 {
|
try {
|
||||||
reader.ReadPendingData();
|
reader.ReadPendingData();
|
||||||
} catch( IOException ex ) {
|
} catch( SocketException ex ) {
|
||||||
ErrorHandler.LogError( "reading packets", ex );
|
ErrorHandler.LogError( "reading packets", ex );
|
||||||
game.Disconnect( "&eLost connection to the server", "I/O error when reading packets" );
|
game.Disconnect( "&eLost connection to the server", "I/O error when reading packets" );
|
||||||
Dispose();
|
Dispose();
|
||||||
@ -129,7 +129,7 @@ namespace ClassicalSharp.Network {
|
|||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
writer.Send();
|
writer.Send();
|
||||||
} catch( IOException ) {
|
} catch( SocketException ) {
|
||||||
// NOTE: Not immediately disconnecting, as otherwise we sometimes miss out on kick messages
|
// NOTE: Not immediately disconnecting, as otherwise we sometimes miss out on kick messages
|
||||||
writer.index = 0;
|
writer.index = 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user