> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# OnDisconnect Method of the ILicensingConnectionRecoveryCallback Interface

> OnDisconnect method of the ILicensingConnectionRecoveryCallback Interface in the ABBYY FineReader Engine API — This method is implemented on the client-side.

> [!NOTE]
>
> This method is implemented in FRE for Linux and Windows.

This method is implemented on the client-side. ABBYY FineReader Engine calls this method when the connection to the license server is broken. Typical implementation of this method could make several attempts at re-establishing connection and, if the attempt is successful, restart the licensing using the [RestartLicensing](https://docs.abbyy.com/fine-reader/engine/api-reference/engine-object-iengine-interface/supplementary-methods/restartlicensing-method.md) method of the [Engine](https://docs.abbyy.com/fine-reader/engine/api-reference/engine-object-iengine-interface.md) object.

## Syntax

### C++

```cpp theme={null}
HRESULT OnDisconnect( VARIANT_BOOL* Result );
```

### C\#

```csharp theme={null}
bool OnDisconnect();
```

### Visual Basic .NET

```vb theme={null}
Function OnDisconnect() As Boolean
```

## Parameters

Result

\[out, retval] This parameter must return TRUE if the connection is re-established and the execution of the program can be continued.

## Return values

This method has no specific return values. It returns the [standard return values of ABBYY FineReader Engine functions](https://docs.abbyy.com/fine-reader/engine/api-reference/return-codes.md).

## See also

[ILicensingConnectionRecoveryCallback](https://docs.abbyy.com/fine-reader/engine/api-reference/license-related-objects/ilicensingconnectionrecoverycallback.md)

[IEngine::SetLicensingConnectionRecoveryCallback](https://docs.abbyy.com/fine-reader/engine/api-reference/engine-object-iengine-interface/supplementary-methods/setlicensingconnectionrecoverycallback-method.md)
