Index: trunk/BNC/src/upload/bncuploadcaster.cpp
===================================================================
--- trunk/BNC/src/upload/bncuploadcaster.cpp	(revision 9730)
+++ trunk/BNC/src/upload/bncuploadcaster.cpp	(revision 9731)
@@ -109,4 +109,6 @@
   }
   if (_outSocket) {
+    disconnect(_outSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));
+    disconnect(_outSocket, SIGNAL(disconnected()), this, SLOT(slotSslSocketConnectionClosed()));
     delete _outSocket;
   }
@@ -212,6 +214,5 @@
       return;
     }
-    delete _outSocket;
-    _outSocket=0;
+    _outSocket->close();
   }
 
@@ -357,9 +358,11 @@
   disconnect(_outSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));
   emit(newMessage("slotSslSocketConnectionClosed", true));
-  delete _outSocket;
-  _outSocket = 0;
-}
-
-
-
-
+  if (_outSocket) {
+    delete _outSocket;
+    _outSocket = 0;
+  }
+}
+
+
+
+
