Browse Source

device: clear host address on disconnect

bboozzoo/device-cache
Maciek Borzecki 10 years ago
parent
commit
b047b98a81
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      src/device.vala

+ 7
- 1
src/device.vala View File

@ -140,6 +140,7 @@ class Device : Object {
if (_channel != null)
_channel.close.begin();
_channel = null;
_host = null;
}
/**
@ -225,8 +226,13 @@ class Device : Object {
paired(is_paired);
}
private void handle_disconnect() {
private async void handle_disconnect() {
// channel got disconnected
debug("channel disconnected");
yield _channel.close();
_channel = null;
_host = null;
// emit disconnected
disconnected();
}
}

Loading…
Cancel
Save