Skip to content

Commit

Permalink
Added error catching as asked for in issue dzikoysk#1604
Browse files Browse the repository at this point in the history
  • Loading branch information
P-DR0ZD committed Oct 14, 2022
1 parent 40aeca7 commit 221ac8c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ internal class CliEndpoint(
journalist.logger.info("CLI | $identifier accessed remote console")

val subscriberId = journalist.subscribe {
ctx.send(it.value)
try{
ctx.send(it.value)
}
catch(e: java.nio.channels.ClosedChannelException) {
journalist.logger.debug("CLI | $identifier tried to access a Closed Channel ")
}
}

users[ctx] = WsSession(identifier, subscriberId)
Expand Down

0 comments on commit 221ac8c

Please sign in to comment.