Skip to content

Commit

Permalink
Update lsp-server/src/main/scala/org/alephium/ralph/lsp/server/RalphL…
Browse files Browse the repository at this point in the history
…angServer.scala

Co-authored-by: Simer <simer.j@gmail.com>
  • Loading branch information
tdroxler and simerplaha authored Nov 6, 2023
1 parent fbf1da2 commit 335a066
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,13 @@ class RalphLangServer private(@volatile private var state: ServerState)(implicit
thisServer.synchronized {
logger.info("exit")

thisServer.state.listener.map(_.cancel(true))
thisServer.state.listener match {
case Some(listener) =>
listener.cancel(true)

case None =>
logger.error("Listener is empty. Exit invoked on server that is not initialised")
}

if(thisServer.state.shutdownReceived) {
0
Expand Down

0 comments on commit 335a066

Please sign in to comment.