[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [flashproxy/master] Do an explicit wait for SIGINT.



commit 95e7b9e8bb8615bdfde05c115b64f173f505b810
Author: David Fifield <david@xxxxxxxxxxxxxxx>
Date:   Sun Nov 11 19:17:25 2012 -0800

    Do an explicit wait for SIGINT.
---
 websocket-transport/websocket-client.go |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/websocket-transport/websocket-client.go b/websocket-transport/websocket-client.go
index f8ae8ef..ca551dd 100644
--- a/websocket-transport/websocket-client.go
+++ b/websocket-transport/websocket-client.go
@@ -7,6 +7,7 @@ import (
 	"net"
 	"net/url"
 	"os"
+	"os/signal"
 	"time"
 )
 
@@ -175,5 +176,7 @@ func main() {
 	}
 	ptCmethodsDone()
 
-	select {}
+	signalChan := make(chan os.Signal, 1)
+	signal.Notify(signalChan, os.Interrupt)
+	<-signalChan
 }



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits