Hi I'm trying to create a tcp-server and running into issues getting the message "The operation is not allowed on non-connected sockets"

The project is an AvaloniaUI project...when I create my MainWindow I start up a TcpListener and run it on a background thread


Code:
private TcpListener _listener;
        public MainWindow()
        {
            InitializeComponent();
...