Skip to content

System.ObjectDisposedException: The object has been closed. after a few seconds #189

Description

@thetestgame

After a few seconds and one command being sent to a Lego hub it abruptly closes the connection. Is there a heartbeat step that needs to occur? This is currently guaranteed to happen every time I try with my current codebase.

System.ObjectDisposedException: The object has been closed. (0x80000013)
   at SharpBrick.PoweredUp.WinRT.WinRTPoweredUpBluetoothCharacteristic.WriteValueAsync(Byte[] data)
   at SharpBrick.PoweredUp.Bluetooth.BluetoothKernel.SendBytesAsync(Byte[] data)
   at SharpBrick.PoweredUp.Protocol.LegoWirelessProtocol.SendMessageAsync(LegoWirelessMessage message)
   at SharpBrick.PoweredUp.Protocol.ILegoWirelessProtocolExtensions.SendMessageReceiveResultAsync[TResultMessage](ILegoWirelessProtocol self, LegoWirelessMessage message, Func`2 filter)
   at SharpBrick.PoweredUp.Protocol.ILegoWirelessProtocolExtensions.SendPortOutputCommandAsync(ILegoWirelessProtocol self, PortOutputCommandMessage message)
   at SharpBrick.PoweredUp.BasicMotor.StartPowerAsync(SByte power)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions