Commit fbb25c4ba59368abd3d54bf501a84c0e0c65c023

Con Kolivas 2013-03-07T15:10:38

Clear the stratum socket whenever we are closing it since the buffer is going to be reused.

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/util.c b/util.c
index e24cce1..62a50da 100644
--- a/util.c
+++ b/util.c
@@ -1506,6 +1506,7 @@ out:
 
 void suspend_stratum(struct pool *pool)
 {
+	clear_sock(pool);
 	applog(LOG_INFO, "Closing socket for stratum pool %d", pool->pool_no);
 	mutex_lock(&pool->stratum_lock);
 	pool->stratum_active = pool->stratum_notify = false;