private void closeRequest(OnDemandRequest onDemandRequest) {
        try {
            if (socket == null) {
                long l = System.currentTimeMillis();
                if (l - openSocketTime < 4000L) {
                    return;
                }
                openSocketTime = l;
                socket = clientInstance.openSocket(43594 + Client.portOff);
                inputStream = socket.getInputStream();
                outputStream = socket.getOutputStream();
                outputStream.write(15);
                for (int j = 0; j < 8; j++) {
                    inputStream.read();
                }
                loopCycle = 0;
            }
            ioBuffer[0] = (byte) onDemandRequest.dataType;
            ioBuffer[1] = (byte) (onDemandRequest.id >> 8);
            ioBuffer[2] = (byte) onDemandRequest.id;
            if (onDemandRequest.incomplete) {
                ioBuffer[3] = 2;
            } else if (!clientInstance.loggedIn) {
                ioBuffer[3] = 1;
            } else {
                ioBuffer[3] = 0;
            }
            outputStream.write(ioBuffer, 0, 4);
            writeLoopCycle = 0;
            anInt1349 = -10000;
            return;
        } catch (IOException ioexception) {
        }
        try {
            socket.close();
        } catch (Exception exception) {
        }
        socket = null;
        inputStream = null;
        outputStream = null;
        expectedSize = 0;
        anInt1349++;
    }