---
title: "removeConnection(_:)"
framework: coremidi
role: symbol
role_heading: Instance Method
path: "coremidi/midinetworksession/removeconnection(_:)"
---

# removeConnection(_:)

Removes a connection from this session.

## Declaration

```swift
func removeConnection(_ connection: MIDINetworkConnection) -> Bool
```

## Parameters

- `connection`: The connection to remove.

## Return Value

Return Value true if the session successfully removed the connection, otherwise false.

## See Also

### Managing Connections

- [connections()](coremidi/midinetworksession/connections().md)
- [addConnection(_:)](coremidi/midinetworksession/addconnection(_:).md)
