diff --git a/src/shared/gatt-client.c b/src/shared/gatt-client.c
index 7541b7c..c4ec611 100644
--- a/src/shared/gatt-client.c
+++ b/src/shared/gatt-client.c
struct request {
struct bt_gatt_client *client;
bool long_write;
+ bool prep_write;
bool removed;
int ref_count;
unsigned int id;
req->destroy = long_write_op_free;
req->long_write = true;
- if (client->in_long_write) {
+ if (client->in_long_write || client->reliable_write_session_id > 0) {
queue_push_tail(client->long_write_queue, req);
return req->id;
}
op->destroy = destroy;
req->destroy = destroy_prep_write_op;
+ req->prep_write = true;
put_le16(value_handle, pdu);
put_le16(offset, pdu + 2);