Skip to content

Commit

Permalink
Merged with main
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardalee committed Jun 27, 2024
1 parent b21f247 commit 7945648
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/C/src/lib/WebSocketServerString.lf
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@ reactor WebSocketServerString(hostport: int = 8080, initial_file: string = {= NU
if (in_dynamic->is_present) {
message_copy = (char*)malloc(strlen(in_dynamic->value));
strcpy(message_copy, in_dynamic->value);
to_send->length = strlen(in_dynamic->value);
} else {
message_copy = (char*)malloc(strlen(in_static->value));
strcpy(message_copy, in_static->value);
to_send->length = strlen(in_static->value);
}
to_send->message = message_copy;
to_send->length = strlen(in_dynamic->value);
to_send->wsi = self->ws.wsi;

lf_set(server.send, to_send);
} else {
// Web socket is not connected.
Expand Down

0 comments on commit 7945648

Please sign in to comment.