This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
matejdro's profile picture

[1.4.1] Add Cooldown to os.reboot()

Started by matejdro, 13 August 2012 - 01:51 PM
matejdro #1
Posted 13 August 2012 - 03:51 PM
Put os.reboot() to startup script and then reboot the computer. It will enter infinite loop that produces a lot of tickrate lag. A couple of computers looping like this can potentially bring down whole server.

It's quite serious issue, so why not add cooldown to os.reboot()? So when you execute os.reboot(), you have to wait let's say around 10 seconds before you can execute it again.
ardera #2
Posted 13 August 2012 - 07:02 PM
Can that really bring down whole servers?
matejdro #3
Posted 13 August 2012 - 08:06 PM
Try it. Set up a server, place down several computers and add reboot on startup. You will start getting "cannot keep up" messages and it will start lagging heavily.
Jan #4
Posted 14 August 2012 - 10:09 PM
Good idea! although the cooldown time should be less than a second.
Noodle #5
Posted 15 August 2012 - 10:27 PM
Not one, but many can kill a server..
It isn't necessary but I would like it.. I think not a cooldown but more of a blocker? Where it wouldn't allow you to have the first line with os.reboot().
matejdro #6
Posted 15 August 2012 - 10:42 PM

print("some random text")
os.reboot()

There, it's not on the first line. Protection bypased.
Cranium #7
Posted 15 August 2012 - 10:55 PM
Or just have os.reboot() last for 2-3 seconds
Cloudy #8
Posted 16 August 2012 - 02:29 PM
Good idea. Will add a cool down between reboots in the next version.
Cranium #9
Posted 16 August 2012 - 03:34 PM
And the system works, folks! Suggestions do get read! Now, about that OP change that will break the game? :(/>/>
ficolas #10
Posted 16 October 2012 - 09:02 PM
There are other scripts (loops) that used maliciously, with only on comp can crash a server
Cloudy #11
Posted 17 October 2012 - 12:27 AM
There are other scripts (loops) that used maliciously, with only on comp can crash a server

And your point of dragging up this topic to say this was?
ChaddJackson12 #12
Posted 17 October 2012 - 04:22 PM
Can that really bring down whole servers?
I'd say it depends on the server, but I wouldn't doubt that it would lag very much.