#vulnerable code 
                                @Override
    public void stop() {
        this.channelPool.stop();
        if (this.sslChannelPool != null) {
            this.sslChannelPool.stop();
        }
        if (this.http2ChannelPool != null) {
            this.http2ChannelPool.stop();
        }
        this.isStarted = false;

        if (this.host != null) {
            this.host.stopService(this.callbackService);
        }
    } 
                            #location 3 
                            #vulnerability type THREAD_SAFETY_VIOLATION
#fixed code
                                @Override
    public void stop() {
        this.channelPool.stop();
        if (this.sslChannelPool != null) {
            this.sslChannelPool.stop();
        }
        if (this.http2ChannelPool != null) {
            this.http2ChannelPool.stop();
        }
        // In practice, it's safe not to synchornize here, but this make Findbugs happy.
        synchronized (this) {
            this.isStarted = false;
        }

        if (this.host != null) {
            this.host.stopService(this.callbackService);
        }
    }