From 388bd2faeb51975f507d04909c883f0ff0b7655a Mon Sep 17 00:00:00 2001 From: Han Xiao Date: Thu, 24 Oct 2019 12:49:55 +0800 Subject: [PATCH] fix(base): fix socket linger --- gnes/service/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/gnes/service/base.py b/gnes/service/base.py index 1e114dcb..4d7dd254 100644 --- a/gnes/service/base.py +++ b/gnes/service/base.py @@ -141,6 +141,7 @@ def build_socket(ctx: 'zmq.Context', host: str, port: int, SocketType.PAIR_BIND: lambda: ctx.socket(zmq.PAIR), SocketType.PAIR_CONNECT: lambda: ctx.socket(zmq.PAIR) }[socket_type]() + sock.setsockopt(zmq.LINGER, 0) if socket_type.is_bind: if use_ipc: