Fixes issue with callback varable definition
Emit timeout errors rather than end stream
Ends cleartextStream after getting certificate