Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-6452

Replace time(0) calls

    XMLWordPrintable

    Details

    • Operating System:
      ALL

      Description

      Although highly unlikely, time(0) can return a value of -1. This value is occasionally set during static initialization. For example, see:

      dbwebserver.cpp:L46    time_t started = time(0); 

      Tangentially, this specific variable is used by the replication logic in health.cpp and consensus.cpp, so dbwebserver.cpp probably isn't the best place to initialize.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: