emtor Report post Posted March 15, 2006 I've created a Bot in python and the Bot is able to stay alive, and respond to some commands. But every 15 minutes I get disconnected from the server(well the server starts sending me some empty packets). The state of my socket is opened so I can't relogin it makes it crash. I send a Heartbeat every 25 seconds to the server(it's works because I stay alive for more then a couple of seconds) i'm just wondering if there is a special hearbeat I need to send each 15 minutes? Or is there is a special events that occurs that make the server send some empty packets? I've read the code From redknight and jelc but could'nt see what was wrong. because I send the exact same heartbeat (checked it with Etherdump) Thanks a lot for your help Share this post Link to post Share on other sites
Learner Report post Posted March 15, 2006 I've created a Bot in python and the Bot is able to stay alive, and respond to some commands. But every 15 minutes I get disconnected from the server(well the server starts sending me some empty packets). The state of my socket is opened so I can't relogin it makes it crash. I send a Heartbeat every 25 seconds to the server(it's works because I stay alive for more then a couple of seconds) i'm just wondering if there is a special hearbeat I need to send each 15 minutes? Or is there is a special events that occurs that make the server send some empty packets? I've read the code From redknight and jelc but could'nt see what was wrong. because I send the exact same heartbeat (checked it with Etherdump) Thanks a lot for your help There is no special code every 15 minutes, and no reason that the server would send empty packets either. The problem sounds like something at your end. Share this post Link to post Share on other sites
emtor Report post Posted March 15, 2006 Good that helps me isolate the troubles. Ill do some more tests on my end, I was just curious Share this post Link to post Share on other sites
Atlantis Report post Posted March 15, 2006 I'm not much of a programmer, but most bots broadcast things 4 times an hour, hence, every 15 minutes. Maybe your problem is in there. Share this post Link to post Share on other sites
Torg Report post Posted March 16, 2006 I'm not much of a programmer, but most bots broadcast things 4 times an hour, hence, every 15 minutes. Maybe your problem is in there. Yeah, that's a reasonable comment. Maybe you are transmitting an auto message every 15 mins and the server doesn't like it. It usually disconnects you, but its possible something else is happening. Share this post Link to post Share on other sites
emtor Report post Posted March 16, 2006 (edited) Good observations, i'm still digging for the error but ill check for that broadcast thing. Edit: No it dosen't broadcast anything ... iM puzzeled lol Edited March 16, 2006 by emtor Share this post Link to post Share on other sites
emtor Report post Posted March 16, 2006 I found what was the problem .. well I think, It's when th server send me a Broadcast #MEssage like a hint or something that my parser don't work. Thank a lot everybod for your Help.. I really feel newbie when I do errors like this Share this post Link to post Share on other sites
Net_man Report post Posted May 21, 2006 this happens with my bot sometimes. i think it is a stay-alive packet being lost, but the best way to deal with it is build a module that will re-start the bot if it dies. my bot isnt foolproof, so i use auto-restarters to make it come back online if it lags out. i've never had a problem with my bot 'dieing' since. (a word of advice, everything can go wrong if you dont sleep for about ten seconds after your bot dies to re-start it) Share this post Link to post Share on other sites
Learner Report post Posted May 21, 2006 this happens with my bot sometimes. i think it is a stay-alive packet being lost, but the best way to deal with it is build a module that will re-start the bot if it dies. my bot isnt foolproof, so i use auto-restarters to make it come back online if it lags out. i've never had a problem with my bot 'dieing' since. (a word of advice, everything can go wrong if you dont sleep for about ten seconds after your bot dies to re-start it) One thing that is a common mistake with bots is send too much text, like in a PM. If you send more then the normal client does, you will be disconnected from the server without warning. Share this post Link to post Share on other sites
Net_man Report post Posted May 21, 2006 this happens with my bot sometimes. i think it is a stay-alive packet being lost, but the best way to deal with it is build a module that will re-start the bot if it dies. my bot isnt foolproof, so i use auto-restarters to make it come back online if it lags out. i've never had a problem with my bot 'dieing' since. (a word of advice, everything can go wrong if you dont sleep for about ten seconds after your bot dies to re-start it) One thing that is a common mistake with bots is send too much text, like in a PM. If you send more then the normal client does, you will be disconnected from the server without warning. isnt the the thing with EVERYTHING? make a spelling error and youre disconnected? **all sarcasm in playfulness** Share this post Link to post Share on other sites
ttlanhil Report post Posted May 21, 2006 make a spelling error and youre disconnected? gee, that'd make EL a nicer, and likely far quieter, place Share this post Link to post Share on other sites