public void run() {
        try {
            exec();
        } finally {
            try {
                Sock.close();
            } catch (IOException ex) {
                ex.printStackTrace();
            }
            Sem.release();
        }
    }