mirror of
https://github.com/glest/glest-source.git
synced 2025-08-21 23:45:14 +02:00
- attempt to make a few tweaks for more smooth network play
This commit is contained in:
@@ -460,7 +460,7 @@ void IRCThread::execute() {
|
||||
ircSession=NULL;
|
||||
|
||||
if(argv.size() != 3) {
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> IRC Usage: <server> <nick> <channel> : got params [%ld]\n",argv.size());
|
||||
if(SystemFlags::VERBOSE_MODE_ENABLED) printf ("===> IRC Usage: <server> <nick> <channel> : got params [%ld]\n",(long int)argv.size());
|
||||
return;
|
||||
}
|
||||
|
||||
|
@@ -1380,6 +1380,7 @@ bool Socket::isConnected() {
|
||||
|
||||
//if the socket is not writable then it is not conencted
|
||||
if(isWritable() == false) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"[%s::%s Line: %d] ERROR isWritable failed.\n",__FILE__,__FUNCTION__,__LINE__);
|
||||
return false;
|
||||
}
|
||||
//if the socket is readable it is connected if we can read a byte from it
|
||||
@@ -1387,6 +1388,7 @@ bool Socket::isConnected() {
|
||||
char tmp;
|
||||
int err = peek(&tmp, 1, false);
|
||||
if(err <= 0 && err != PLATFORM_SOCKET_TRY_AGAIN) {
|
||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"[%s::%s Line: %d] ERROR Peek failed, err = %d, error = %s\n",__FILE__,__FUNCTION__,__LINE__,err,getLastSocketErrorFormattedText().c_str());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user