Scheduler - users are kicked after 4 mins....

Post here your questions about Actionscript and Java server side extensions development.

Moderators: Lapo, Bax

Post Reply
dvine
Posts: 47
Joined: 21 Sep 2006, 10:08
Location: Köln, Germany
Contact:

Scheduler - users are kicked after 4 mins....

Post by dvine »

Hello there,
i have the following problem. When i have the scheduler enabled in an extension, my users get kicked after 4 minutes... here is the code i use:

Code: Select all

function init()
{
	dbase = _server.getDatabaseManager()
	globalUsers = []
	scheduler = new _scheduler.Scheduler()

	// Start the scheduler
	scheduler.startService()

	/*
	* The Task object describes the task to be executed
	* You can pass any object in the constructor, containing any custom parameters
	*/
	var task1 = new _scheduler.Task( {name:"updateUserLists"} )

	/*
	* This is the object that handles the call-backs generated by the Scheduler
	* when it's time to execute the task.
	*
	* The object must implement a method called doTask which receives a Task object
	* as the argument.
	*/
	var handlerObj = {}
	handlerObj.count = 0
	handlerObj.doTask = function(task)
	{
		getAllUsers(0);
		var recipents = [];
		var zone = _server.getCurrentZone();
		var foyer = zone.getRoomByName("allFoyer");
	   
	   var userList = foyer.getAllUsers()
	   for (var j in userList) {
		   recipients.push(userList[j])
	   }
		var users = globalUsers; 
		var responseObj = {}
		responseObj._cmd = "getAllUsers"
		responseObj.users = users;
		_server.sendResponse(responseObj, -1, null, recipients);
	}

	// We create the call-back handler
	var taskHandler = new _scheduler.ITaskHandler( handlerObj )

	/*
	* Here we add the tasks to the scheduler
	* specifiying the delay interval (2nd param) in seconds
	* if the task loops (3rd param)
	* and the call-back handler (4th param)
	*/
	scheduler.addScheduledTask(task1, 3, true, taskHandler)
}
even if i do not handle the response at all my user still gets disconnected after 4 mins... whats going on there??

peace
Daniel
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

kicked? or disconnected?
Kicking is automatic is you have activated the flood filter or bad-word filter
even if i do not handle the response at all my user still gets disconnected after 4 mins... whats going on there??
It's not clear ...
What the client is doing? Is he sending any request during those 4 minutes? And did you set the maxIdleUserTime setting?
Lapo
--
gotoAndPlay()
...addicted to flash games
dvine
Posts: 47
Joined: 21 Sep 2006, 10:08
Location: Köln, Germany
Contact:

Post by dvine »

Ok - ill try to clear this up.... I think the user is just disconnected. Flood filter and bad-word filter are both turned off....

Oh and i changed the maxUserIdleTime to something like 80000.
I just tested it with just one user that was doing nothing. Not sending requests or anything...

But still - after 4 minutes he got disconnected... But if i comment out this line:

Code: Select all

_server.sendResponse(responseObj, -1, null, recipients);

then the client stays connected...
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

It would help a lot if you could send us a small test example that shows the problem. Thanks
Lapo
--
gotoAndPlay()
...addicted to flash games
dvine
Posts: 47
Joined: 21 Sep 2006, 10:08
Location: Köln, Germany
Contact:

Post by dvine »

i checked again... and everything runs fine... then i add the scheduler stuff mentioned in first post... and now users get disconnected after 4 mins... maybe you can just try and add the stuff to an extension and try for yourself?
dvine
Posts: 47
Joined: 21 Sep 2006, 10:08
Location: Köln, Germany
Contact:

Post by dvine »

still doesnt work :-(
Super-Lapo - please help!!
We are urgently awaiting that this matter gets fixed so we can upload our new version...
User avatar
Lapo
Site Admin
Posts: 23438
Joined: 21 Mar 2005, 09:50
Location: Italy

Post by Lapo »

can this be reproduced locally?
I mean, if you run your code in the LAN does it create the same problem?
Lapo
--
gotoAndPlay()
...addicted to flash games
dvine
Posts: 47
Joined: 21 Sep 2006, 10:08
Location: Köln, Germany
Contact:

Post by dvine »

Hey Lapo,
I found the mistake after i saw that our error file was 40GB big...
I had a typo - but still dont know why users were being kicked...
thanks anyway - you guys rock
Daniel Weingarten
Post Reply