Share this page

# LrJposChannel.reconnect

Triggers a disconnect followed by a reconnect.

`public static void reconnect() throws IOException`

## Return values

This function does not return any values.

## Example

Copy code

    public void checkConnection() throws Throwable {
            if (LrJposChannel.isConnected()) {
                lr.output_message("Channel is connected. Triggering reconnect");
                LrJposChannel.reconnect();
                //send messages
                //...
            }
            else {
                lr.output_message("Channel is not connected");
                try {
                    LrJposChannel.connect();
                    lr.output_message("Channel is now connected");
                }catch (Exception ex) {
                    lr.output_message("Channel cannot connect");
                }
            }
    }

Tips to improve your search results... VuGen Function Reference Version 26.1-26.3 Function Reference 26.1-26.3 All View Local Help Center View Online Help Center Version: