select function: return error condition when network connection fails
remove stray console.log
Move error check into canRead function and use an outer scope variable to report the error condition.
- added test cases for select error reporting
- added missing error reporting for sockets in the write file descriptor set
Merge pull request #898 from MichaelRiss/selectFix

select function: return error condition when network connection fails