fix spinning indefinitely on partial TLS record (issue #1280)

fixes https://github.com/jruby/jruby/issues/1280