diff --git a/sstpd/__main__.py b/sstpd/__main__.py index 216ecb3..a8062d1 100755 --- a/sstpd/__main__.py +++ b/sstpd/__main__.py @@ -2,6 +2,7 @@ import sys import logging import argparse +from socket import IPPROTO_TCP, TCP_NODELAY from configparser import SafeConfigParser, NoSectionError import ssl import asyncio @@ -154,6 +155,10 @@ def main(): ssl=ssl_ctx) server = loop.run_until_complete(coro) + if not on_unix_socket: + for sock in server.sockets: + sock.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1) + if args.proxy_protocol: logging.info('PROXY PROTOCOL is activated.') if on_unix_socket: