Index: trunk/BNC/src/upload/bncuploadcaster.cpp
===================================================================
--- trunk/BNC/src/upload/bncuploadcaster.cpp	(revision 9726)
+++ trunk/BNC/src/upload/bncuploadcaster.cpp	(revision 9727)
@@ -123,4 +123,5 @@
  ////////////////////////////////////////////////////////////////////////////
 void bncUploadCaster::slotSslErrors(QList<QSslError> errors) {
+  emit(newMessage("slotSslErrors", true));
   QString msg = "SSL Error: ";
   if (_outSocket) {
@@ -232,4 +233,5 @@
   _outSocket->setSslConfiguration(sslConfig);
   _outSocket->setProxy(QNetworkProxy::NoProxy);
+  connect(_outSocket, SIGNAL(disconnected()), this, SLOT(slotSslSocketConnectionClosed()));
   connect(_outSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));
 
@@ -360,7 +362,12 @@
 
 
-
-
-
-
-
+void bncUploadCaster::slotSslSocketConnectionClosed() {
+  emit(newMessage("slotSslSocketConnectionClosed", true));
+  delete _outSocket;
+  _outSocket = 0;
+  disconnect(_outSocket, SIGNAL(sslErrors(QList<QSslError>)), this, SLOT(slotSslErrors(QList<QSslError>)));
+}
+
+
+
+
Index: trunk/BNC/src/upload/bncuploadcaster.h
===================================================================
--- trunk/BNC/src/upload/bncuploadcaster.h	(revision 9726)
+++ trunk/BNC/src/upload/bncuploadcaster.h	(revision 9727)
@@ -37,4 +37,5 @@
   void slotProxyAuthenticationRequired(const QNetworkProxy&, QAuthenticator*);
   void slotSslErrors(QList<QSslError>);
+  void slotSslSocketConnectionClosed();
 
  private:
