handle WaitReadable and WaitWritable errors

handling errors that can be raised in [SSLSocket#read_nonblock](http://ruby-doc.org/stdlib-1.9.3/libdoc/openssl/rdoc/OpenSSL/Buffering.html#method-i-read_nonblock)