diff --git a/bin/confetty b/bin/confetty index 8bc3b56b..b37736af 100755 --- a/bin/confetty +++ b/bin/confetty @@ -296,6 +296,7 @@ def connect_tls_server(serverstring): af, socktype, proto, cononname, sa = res try: server = socket.socket(af, socktype, proto) + server.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) except: server = None continue diff --git a/confluent/sockapi.py b/confluent/sockapi.py index 500082a1..97c9f099 100644 --- a/confluent/sockapi.py +++ b/confluent/sockapi.py @@ -133,6 +133,7 @@ def process_request(connection, request, cfm, authdata): def _tlshandler(): plainsocket = socket.socket() plainsocket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) + plainsocket.setsockopt(socket.SOL_SOCKET, socket.TCP_NODELAY, 1) srv = ssl.wrap_socket(plainsocket, keyfile="/etc/confluent/privkey.pem", certfile="/etc/confluent/srvcert.pem", ssl_version=ssl.PROTOCOL_TLSv1,