iphone connects to itunes, try to restore get error 21.
I tried fixing my cracked screen, I went into videos watched them, fixed my phone and it all went OK. I then tried turning it on and nothing happened, so I plugged it into my computer and the apple logo appeared. Then it went into a continuous boot loop, I held the power and home button and then it told me to connect to itunes and then I heard the noise that meant an apple device had been plugged in. I checked itunes and it told me it couldn't update so it needed to restore, I started the restore and it gets stuck at the last bit of extracting software and then the iphone disconnects and itunes has the error message (21). Can anybody help me into fixing my iphone?
P.S. It only turns on when it is plugged in and then it shows the apple logo then connect to itunes logo.
iPhone 4S, iOS 8.2, Not Jailbroken