-
-
Notifications
You must be signed in to change notification settings - Fork 925
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #3745. IO#block_nonwrite causes CCE on Windows.
I made a marker interface so that both ChannelStream and CRLFStream wrapper can have a common type so they can call writenonblock. I added an error check to throw and IOException if CRLFStreamWrapper is wrapping from stream type but I suspect it is an impossible path by this point in our code. Zero 1.7 risk fix since this was just dumping stack before.
Showing
4 changed files
with
22 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
core/src/main/java/org/jruby/util/io/NonblockWritingStream.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.jruby.util.io; | ||
|
||
import java.io.IOException; | ||
import org.jruby.util.ByteList; | ||
|
||
/** | ||
* Hacky marker interface for 1.9 support of CRLFStreamWrapper. | ||
* So it and the natural stream ChannelStream can both call nonblockingwrite. | ||
*/ | ||
public interface NonblockWritingStream { | ||
public int writenonblock(ByteList buf) throws IOException, BadDescriptorException; | ||
} |