clean up socket timeout code and remove compiler error
Merge branch 'feature/hal' of https://github.com/spark/core-firmware into feature/hal