Skip to content

Commit

Permalink
examples/multi_webcamera: Reinforce fail safe
Browse files Browse the repository at this point in the history
To reinforce fail safe, re-create server socket after finishing
the client connection.
  • Loading branch information
SPRESENSE committed Aug 2, 2022
1 parent c978c81 commit f765585
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion examples/multi_webcamera/multiwebcam_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,12 @@ int main(int argc, FAR char *argv[])
printf("Finish Jpeg thread.\n");
wsock = 0;
}
#ifndef CONFIG_EXAMPLES_MULTIWEBCAM_FAILSAFE
else
#endif
{
printf("Accept is failed. Re-create server socket\n");
printf("Re-create server socket\n");
close(rsock);
rsock = multiwebcam_initserver(MULTIWEBCAM_PORT_NO);
}

Expand Down

0 comments on commit f765585

Please sign in to comment.