xmpp/stream.go
changeset 129 cccf2b2fe34d
parent 128 8342afcffc92
child 130 da6f37ae3ffe
equal deleted inserted replaced
128:8342afcffc92 129:cccf2b2fe34d
   339 	cl.socket = nil
   339 	cl.socket = nil
   340 	cl.socketSync.Add(1)
   340 	cl.socketSync.Add(1)
   341 	cl.socketSync.Wait()
   341 	cl.socketSync.Wait()
   342 
   342 
   343 	// Negotiate TLS with the server.
   343 	// Negotiate TLS with the server.
   344 	tls := tls.Client(tcp, &TlsConfig)
   344 	tls := tls.Client(tcp, &cl.TlsConfig)
   345 
   345 
   346 	// Make the TLS connection available to the reader, and wait
   346 	// Make the TLS connection available to the reader, and wait
   347 	// for it to signal that it's working again.
   347 	// for it to signal that it's working again.
   348 	cl.socketSync.Add(1)
   348 	cl.socketSync.Add(1)
   349 	cl.socket = tls
   349 	cl.socket = tls