Removed setjmp, changed alarm to socket timeout