Skip to content

Commit 5f59512

Browse files
committed
Remove the keepalive call within write that causes crash, courtesy of @jgstroud
1 parent 7a1d21a commit 5f59512

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/arduino_homekit_server.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,8 @@ void write(client_context_t *context, byte *data, int data_size) {
536536
CLIENT_DEBUG(context, "Sending data of size %d", data_size);
537537
if (write_size != data_size) {
538538
context->error_write = true;
539-
context->socket->keepAlive(1, 1, 1); // fast disconnected internally in 1 second.
539+
//context->socket->keepAlive(1, 1, 1); // fast disconnected internally in 1 second.
540+
context->socket->stop();
540541
CLIENT_ERROR(context, "socket.write, data_size=%d, write_size=%d", data_size, write_size);
541542
}
542543
}

0 commit comments

Comments
 (0)