The continuous config primary step down thread first tries to contact a config server. The C++ code that is eventually called opens a connection to the specified config server, and follows up with an isMaster command. However, the config server, if a primary, may step down between creating the connection and calling isMaster. When the primary steps down it closes all of its connections, so the followup isMaster command throws an error.
In this case, the error should be caught and the command retried, rather than quitting with an error.