Let's not block the main goroutine if you don't call WaitToConnect

parent 74ab0b7f
......@@ -17,7 +17,6 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import minclient
import time
name = "alice"
provider = "example.com"
......
......@@ -61,7 +61,7 @@ func (client Client) NewSession(user string, provider string, key Key) (Session,
}
session.queue = make(chan string, 100)
session.connected = make(chan bool)
session.connected = make(chan bool, 1)
session.surbKeys = make(map[[constants.SURBIDLength]byte][]byte)
session.client, err = minclient.New(clientCfg)
session.log = client.log.GetLogger(fmt.Sprintf("callbacks:%s@%s", user, provider))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment