Raised This Month: $ Target: $400
 0% 

hlds freezes when connecting to hltv


Post New Thread Reply   
 
Thread Tools Display Modes
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
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 11-19-2010 , 20:17   Re: hlds freezes when connecting to hltv
Reply With Quote #2

And if you connect your HLTV manually everytime?
__________________
fysiks is offline
sparkey
Senior Member
Join Date: May 2010
Old 11-19-2010 , 21:15   Re: hlds freezes when connecting to hltv
Reply With Quote #3

Quote:
Originally Posted by fysiks View Post
And if you connect your HLTV manually everytime?
Thx for your answer.

Hltv is connected to the server, its when authenticating and executing the command to the hltv that it freezes.
sparkey is offline
madeitout
Member
Join Date: Jun 2008
Old 11-20-2010 , 07:04   Re: hlds freezes when connecting to hltv
Reply With Quote #4

your server will hang if the server your connecting to with your socket is down or slow.
there is a modified version of hackziners sockets_hz module somewhere that will solve your dilemma
__________________
madeitout is offline
sparkey
Senior Member
Join Date: May 2010
Old 11-20-2010 , 10:49   Re: hlds freezes when connecting to hltv
Reply With Quote #5

Quote:
Originally Posted by madeitout View Post
your server will hang if the server your connecting to with your socket is down or slow.
there is a modified version of hackziners sockets_hz module somewhere that will solve your dilemma
Ahh thx Would it be enough to just replace the include the socket_hz module instead of the socket module or do you think i have to change any code?
sparkey is offline
sparkey
Senior Member
Join Date: May 2010
Old 07-15-2011 , 13:28   Re: hlds freezes when connecting to hltv
Reply With Quote #6

Hi again,

This problem is still not solved

Is'nt hackziners modified version only for listening or is it also modified to solve my dilemma when opening a socket to send data to the hltv?

Best regards
sparkey is offline
Reply



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