Skip to content

Commit

Permalink
Fix bug jruby/jruby#1156 .
Browse files Browse the repository at this point in the history
Signed-off-by: Charles Oliver Nutter <headius@headius.com>
  • Loading branch information
Xb authored and kares committed Jun 25, 2014
1 parent edcdc1f commit c13884a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/jruby/ext/openssl/SSLSocket.java
Expand Up @@ -482,6 +482,9 @@ public int write(ByteBuffer src, boolean blocking) throws SSLException, IOExcept
}
netData.clear();
SSLEngineResult res = engine.wrap(src, netData);
if (res.getStatus()==SSLEngineResult.Status.CLOSED) {
throw getRuntime().newIOError("closed SSL engine");
}
netData.flip();
flushData(blocking);
return res.bytesConsumed();
Expand Down

0 comments on commit c13884a

Please sign in to comment.