added socket timeout of 1 second for linux