Skip to content

Commit

Permalink
Fix segfault when rpc client disconnects on linux app (#26320)
Browse files Browse the repository at this point in the history
  • Loading branch information
tehampson authored and pull[bot] committed Mar 5, 2024
1 parent 0b08931 commit 577a995
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions examples/platform/linux/system_rpc_server.cc
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,8 @@ Status Start()
// An out of range status indicates the remote end has disconnected.
// Start to serve the connection again, which will allow another
// remote to connect.
socket_stream.Close();
server_socket.Close();
PW_CHECK_OK(server_socket.Listen(socket_port));
auto accept_result = server_socket.Accept();
PW_CHECK_OK(accept_result.status());
Expand Down

0 comments on commit 577a995

Please sign in to comment.