From 82cfd4c2bcc1dd9539a1d62a5a76dcf666d16985 Mon Sep 17 00:00:00 2001 From: Mark Becwar Date: Thu, 18 Jul 2019 10:45:26 -0400 Subject: [PATCH] Change Read Timeout For Windows Change the timeout on the first read, to allow a CTRL+C to stop watchman-make on Windows without waiting for the 10 minute timeout --- python/bin/watchman-make | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python/bin/watchman-make b/python/bin/watchman-make index f4d6137bf243..57bdc9392c4f 100755 --- a/python/bin/watchman-make +++ b/python/bin/watchman-make @@ -260,7 +260,12 @@ while True: try: # Wait for changes to start to occur. We're happy to wait # quite some time for this - client.setTimeout(600) + if sys.platform == "win32": + # On Windows the way the socket is read a CTRL-C it takes this much + # time for a CTRL+C to get back out to us. + client.setTimeout(3) + else: + client.setTimeout(600) result = client.receive() for _, t in targets.items():