Skip to content

Commit d138d9f

Browse files
committed
Only close stream when present
It can be nil e.g. when the connection closes prematurely during TLS handshake. Fixes #617.
1 parent b414715 commit d138d9f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/aleph/tcp.clj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@
5353

5454
:channel-inactive
5555
([_ ctx]
56-
(s/close! @in)
57-
(.fireChannelInactive ctx))
56+
(some-> @in s/close!)
57+
(.fireChannelInactive ctx))
5858

5959
:channel-active
6060
([_ ctx]

0 commit comments

Comments
 (0)