mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-08-01 15:08:40 +00:00
9pmount-vsock: only try to accept 1 connection
The database has a reconnect loop, and we don't particularly want to accept more than one of its connections per mount. Signed-off-by: David Scott <dave.scott@docker.com>
This commit is contained in:
parent
36d09be949
commit
a772c2b7d6
@ -104,7 +104,7 @@ static int create_listening_socket(GUID serviceid) {
|
||||
exit(1);
|
||||
}
|
||||
|
||||
res = listen(lsock, SOMAXCONN);
|
||||
res = listen(lsock, 1);
|
||||
if (res == SOCKET_ERROR) {
|
||||
sockerr("listen()");
|
||||
closesocket(lsock);
|
||||
@ -226,6 +226,7 @@ int __cdecl main(int argc, char **argv)
|
||||
syslog(LOG_INFO, "starting in listening mode with serviceid=%s", serviceid);
|
||||
SOCKET lsocket = create_listening_socket(sid);
|
||||
sock = accept_socket(lsocket);
|
||||
close(lsocket);
|
||||
} else {
|
||||
syslog(LOG_INFO, "starting in connect mode with serviceid=%s", serviceid);
|
||||
sock = connect_socket(sid);
|
||||
|
Loading…
Reference in New Issue
Block a user