diff --git a/src/gatt-client.c b/src/gatt-client.c
index 20c3fbe..c706307 100644
--- a/src/gatt-client.c
+++ b/src/gatt-client.c
const char *sender = dbus_message_get_sender(msg);
struct async_dbus_op *op;
struct notify_client *client;
+ struct btd_device *device = chrc->service->client->device;
+
+ if (device_is_disconnecting(device)) {
+ error("Device is disconnecting. StartNotify is not allowed.");
+ return btd_error_not_connected(msg);
+ }
if (chrc->notify_io)
return btd_error_not_permitted(msg, "Notify acquired");