Don't leak the old socket when using STARTTLS.
This commit is contained in:
parent
4121a434b7
commit
05c2784b17
1 changed files with 4 additions and 1 deletions
|
@ -346,7 +346,10 @@
|
||||||
if ([[elem namespace] isEqual: XMPP_NS_STARTTLS]) {
|
if ([[elem namespace] isEqual: XMPP_NS_STARTTLS]) {
|
||||||
if ([[elem name] isEqual: @"proceed"]) {
|
if ([[elem name] isEqual: @"proceed"]) {
|
||||||
/* FIXME: Catch errors here */
|
/* FIXME: Catch errors here */
|
||||||
sock = [[SSLSocket alloc] initWithSocket: sock];
|
SSLSocket *newSock = [[SSLSocket alloc]
|
||||||
|
initWithSocket: sock];
|
||||||
|
[sock release];
|
||||||
|
sock = newSock;
|
||||||
|
|
||||||
/* Stream restart */
|
/* Stream restart */
|
||||||
[parser setDelegate: self];
|
[parser setDelegate: self];
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue