           @removeListener 'error', onError
           @stop()
           resolve channel
+        else
+          channel.close()
       onError = (error) =>
         @removeListener 'channel', onChannel
         @removeListener 'error', onError

  _onSerialPortList: (error, ports) ->
    if error
      @emit 'error', error
    return unless ports
    for port in ports
      continue unless rfconnPath = port.comName
      @_onSerialPort rfconnPath

    BleChannel.fromPeripheral(peripheral)
      .then (bleChannel) =>
        return if bleChannel is null
        if @_started is true
          @emit 'channel', bleChannel
        else
          bleChannel.close()
      .catch (error) =>
        @emit 'error', error

