[v2] Increase listen queue to 128

Submitted by Imran Zaman on Nov. 24, 2014, 2:10 p.m.

Details

Message ID 1416838249-9742-1-git-send-email-imran.zaman@gmail.com
State Accepted
Commit 11560a8d15435b06633659266b23128426d02ffc
Headers show

Not browsing as part of any series.

Commit Message

Imran Zaman Nov. 24, 2014, 2:10 p.m.
This will allow more than 1 simultaneous client connections to the server
without the possibility of connection refused error.

Signed-off-by: Imran Zaman <imran.zaman@gmail.com>
---
 src/wayland-server.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/src/wayland-server.c b/src/wayland-server.c
index c40d300..c845dd6 100644
--- a/src/wayland-server.c
+++ b/src/wayland-server.c
@@ -1139,7 +1139,7 @@  _wl_display_add_socket(struct wl_display *display, struct wl_socket *s)
 		return -1;
 	}
 
-	if (listen(s->fd, 1) < 0) {
+	if (listen(s->fd, 128) < 0) {
 		wl_log("listen() failed with error: %m\n");
 		return -1;
 	}

Comments

On Mon, 24 Nov 2014 16:10:49 +0200
Imran Zaman <imran.zaman@gmail.com> wrote:

> This will allow more than 1 simultaneous client connections to the server
> without the possibility of connection refused error.
> 
> Signed-off-by: Imran Zaman <imran.zaman@gmail.com>
> ---
>  src/wayland-server.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/wayland-server.c b/src/wayland-server.c
> index c40d300..c845dd6 100644
> --- a/src/wayland-server.c
> +++ b/src/wayland-server.c
> @@ -1139,7 +1139,7 @@ _wl_display_add_socket(struct wl_display *display, struct wl_socket *s)
>  		return -1;
>  	}
>  
> -	if (listen(s->fd, 1) < 0) {
> +	if (listen(s->fd, 128) < 0) {
>  		wl_log("listen() failed with error: %m\n");
>  		return -1;
>  	}

Pushed, I added the links to the commit message just in case.


Thanks,
pq