Added basic testing for socket timeout feature and fixed the feature to ensure it works.