Skip to content

Commit

Permalink
LIVY-131. NPE in LivyServer when starting LivyServer
Browse files Browse the repository at this point in the history
Closes apache#116
  • Loading branch information
zjffdu authored and Marcelo Vanzin committed Apr 25, 2016
1 parent 03209b4 commit c3d5709
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,9 @@ class LivyServer extends Logging {
def join(): Unit = server.join()

def stop(): Unit = {
server.stop()
if (server != null) {
server.stop()
}
}

def serverUrl(): String = {
Expand Down Expand Up @@ -193,6 +195,7 @@ object LivyServer {
def main(args: Array[String]): Unit = {
val server = new LivyServer()
try {
server.start()
server.join()
} finally {
server.stop()
Expand Down

0 comments on commit c3d5709

Please sign in to comment.