Raised This Month: $ Target: $400
 0% 

hlds freezes when connecting to hltv


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
sparkey
Senior Member
Join Date: May 2010
Old 11-19-2010 , 17:34   hlds freezes when connecting to hltv
Reply With Quote #1

Hello,

I got a big trouble at my hands and i have been looking for the problem for days now and don't know where to look next.

Nothing is reported the amx logs, neither hlds debug logs. I have checked the kernel, system logs and nothing there either.

The hlds process just freezes and gets timeout, not crashing just frozen at the state when connecting to the hltv. I have found that it is happening when connecting to the hltv to execute the command.

I have tried to disable iptabels (firewall) on all the servers to make sure that it is not the problem without luck.

It is not always happening, it happens for lets say 1 of 30 times but is getting really annoying to manually restart servers every hour.

Here is the code for the hltv function.

PHP Code:
public hltv_reset()
{
    new 
socket 0;
    new 
error;
    new 
rconid[13];
    new 
rcv[256];
    new 
snd[256];
    new 
rconPass[32];

    
// Connect to server
    
socket socket_open(HLTVhltv_portSOCKET_UDPerror);
    if (
error != 0)
    {
        
server_print("[%s]%s HLTV Record :: Connection to HLTV %s:%s  failed. Error: %s",log_time(), SERVER_PREFIXHLTVhltv_porterror);
    } else {
        
//send challenge rcon and receive response
        
setc(snd,4,0xff);
        
copy(snd[4],255,"challenge rcon");
        
setc(snd[18],1,'^n');
        
socket_send(socket,snd,255);
        
socket_recv(socket,rcv,255);

        
// get rcon challenge number from response
        
copy(rconid,12,rcv[19]);
        
replace(rconid,255,"^n","");
        
rconPass "xxxxxxxxx";

        
// set rcon command
        
setc(snd,255,0x00);
        
setc(snd,4,0xff);
        
format(snd[4],255,"rcon %s %s  stoprecording",rconid,rconPass);

        
// send rcon command and close socket
        
socket_send(socket,snd,255);
        
socket_close(socket);

        
server_print("[%s]%s HLTV Record :: Automatic recording now ending %s:%d.",log_time(), SERVER_PREFIXHLTVhltv_port);
    }

Thanks guys!
sparkey is offline
 


Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 11:28.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode