diff --git a/SickRfid/DisconnectedSickRfidController.cs b/SickRfid/DisconnectedSickRfidController.cs index cb3977c..e82cea3 100644 --- a/SickRfid/DisconnectedSickRfidController.cs +++ b/SickRfid/DisconnectedSickRfidController.cs @@ -18,10 +18,10 @@ internal DisconnectedSickRfidController(IPAddress ipAddress, int port) _port = port; } - public async Task ConnectAsync() + public async Task ConnectAsync(CancellationToken cancellationToken = default) { var socket = new Socket(SocketType.Stream, ProtocolType.Tcp); - await socket.ConnectAsync(_ipAddress, _port).ConfigureAwait(true); + await socket.ConnectAsync(_ipAddress, _port, cancellationToken).ConfigureAwait(true); return new ConnectedSickRfidController().SetSocket(socket); } -} \ No newline at end of file +}