From 43bf242ffd985440dad36fcf56bf0519263830b0 Mon Sep 17 00:00:00 2001
From: Henry Camacho <henry.f.camacho@gmail.com>
Date: Sun, 19 Feb 2017 15:51:54 -0600
Subject: [PATCH] =?UTF-8?q?fixed=20debugging=20-=20I=20was=20never=20able?=
 =?UTF-8?q?=20to=20get=20delve=20and=20visual=20studio=20code=20to=20work?=
 =?UTF-8?q?=20properly=20with=20this=20project.=20-=20not=20sure=20if=20it?=
 =?UTF-8?q?=20is=20too=20complex,=20however=20a=20simple=20application=20c?=
 =?UTF-8?q?ould=20be=20debugged=20just=20fine.=20-=20I=E2=80=99ve=20implem?=
 =?UTF-8?q?ented=20godebug,=20and=20resolved=20the=20vendor=20dependancies?=
 =?UTF-8?q?=20-=20now=20able=20to=20debug=20in=20development,=20and=20buil?=
 =?UTF-8?q?d=20self-contained=20code=20into=20QA/STAGING.=20-=20this=20res?=
 =?UTF-8?q?olves=20the=20issues=20at=20this=20point.?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 d                                   | 2 ++
 rvpn/connection/connection_table.go | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100755 d

diff --git a/d b/d
new file mode 100755
index 0000000..013a284
--- /dev/null
+++ b/d
@@ -0,0 +1,2 @@
+godebug build -instrument git.daplie.com/Daplie/go-rvpn-server/rvpn/connection  -o debug main.go
+
diff --git a/rvpn/connection/connection_table.go b/rvpn/connection/connection_table.go
index 00fdbcd..f814fa5 100755
--- a/rvpn/connection/connection_table.go
+++ b/rvpn/connection/connection_table.go
@@ -44,6 +44,7 @@ func (c *Table) ConnByDomain(domain string) (conn *Connection, ok bool) {
 
 //reaper --
 func (c *Table) reaper(delay int, idle int) {
+	_ = "breakpoint"
 	for {
 		loginfo.Println("Reaper waiting for ", delay, " seconds")
 		time.Sleep(time.Duration(delay) * time.Second)
@@ -64,7 +65,7 @@ func (c *Table) reaper(delay int, idle int) {
 func (c *Table) Run() {
 	loginfo.Println("ConnectionTable starting")
 
-	go c.reaper(10, 20)
+	go c.reaper(300, 60)
 
 	for {
 		select {