Commit 056973ed authored by Seblu's avatar Seblu
Browse files

fix segfault if no orginal connexion

parent 2ede7947
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -102,10 +102,12 @@ void SLDaemon::run() {
  catch (const Error &e) {
    if (e.code() != ERR_NET)
      throw;
    if (socket_fs_ != 0) {
      if (verbose()) // TODO: Print the time at lost
	logerr << "Connexion lost. Retrying in " << options.retrydelay << " seconds.\n";
      fclose(socket_fs_);
      socket_fs_ = 0;
    }
    sleep(options.retrydelay);
    goto net_connect;
  }