# libtmux.control:close-connection

- **Package:** libtmux/control
- **Language:** Common Lisp
- **Kind:** function
- **Source:** https://github.com/libtmux/libtmux-lisp/blob/c2e5fc4ed3befda21f45dfa5d5868c38fd138311/src/control.lisp#L153
- **Public owner:** libtmux.control
- **Page:** https://libtmux.org/en/lisp/latest/reference/libtmux-control-close-connection/

```
(close-connection connection)

Primary method: libtmux.control:connection:
(close-connection (connection libtmux.control:connection))
```

Close this connection's worker and process; return NIL after cleanup.
Leave the tmux daemon running. Concurrent closes serialize; repeated successful
close is harmless. In-flight results retain partial output and dispatch state.
Cleanup can add time beyond request deadlines. Failure signals
CONNECTION-CLEANUP-FAILED and retains this resource for explicit retry.

See also: `libtmux.control:connection-cleanup-failures`, `libtmux.control:pending-cleanups`, `libtmux.control:with-connection`.

## Methods

### `(close-connection (connection libtmux.control:connection))`

## Parameters

- `connection` (for `close-connection(connection)`)
- `connection` (`libtmux.control:connection`) (for `Primary method: libtmux.control:connection`)
