JRuby raises IOError if the socket is there. Fixes #377