Skip to content

Commit a638b24

Browse files
committed
refine the fix for the ReadableByteChannel -> seq-of conversion, mark 0.2.4-alpha3
1 parent 8bb31a3 commit a638b24

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

project.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(defproject byte-streams "0.2.4-alpha2"
1+
(defproject byte-streams "0.2.4-alpha3"
22
:description "A simple way to handle the menagerie of Java byte represenations."
33
:license {:name "MIT License"
44
:url "http://opensource.org/licenses/MIT"}

src/byte_streams.clj

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -696,7 +696,12 @@
696696
(ByteBuffer/allocateDirect n)
697697
(ByteBuffer/allocate n))]
698698

699-
(while (pos? (.read this buf)))
699+
(loop []
700+
(when (try
701+
(pos? (.read this buf))
702+
(catch Throwable e
703+
false))
704+
(recur)))
700705

701706
(when (pos? (.position buf))
702707
(.flip buf))))

0 commit comments

Comments
 (0)