I have been performing a tethered jailbreak for the past month on the iPhone 3gs 3.1.2 5.11.07 with blackra1n.
and yesterday during the jailbreak when the phone disconnects itself from the computer after 2 seconds it turns off and the jailbreak fails and when I turn the phone on I get back to Connect to iTunes logo.

Recently I also installed AndroidLock XT and hadn't restarted the phone for 3-4 days.