package com.hamishrickerby.http_server;

/**
 * Created by rickerbh on 15/08/2016.
 */
public class App {
    public static void main(String[] args) {
        AppArguments arguments = new AppArguments(args);
        Integer port = Integer.parseInt(arguments.getOrDefault("-p", "5000"));
        try {
            SocketServer server = new SocketServer(port);
            Thread.sleep(5000);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}

@@ -280,16 +280,52 @@
 000%22));%0A
+        SocketServer server = null;%0A
         
@@ -338,37 +338,24 @@
             
-SocketServer 
 server = new
@@ -472,16 +472,64 @@
 race();%0A
+        %7D finally %7B%0A            server.close();%0A
         

Add closing of socket server on app exit