Fix for socket hang when remote server disconnects (https://groups.google.com/d/msg/gevent/b8PrC-y9J6Y/lhKgKzuPl_cJ)