[Commits] [wesnoth/wesnoth] 08a866: Revert "Refactor out wesnothd_connection_ptr wrapp...

GitHub noreply at github.com
Sun Sep 3 13:51:23 UTC 2017


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 08a866dc20e678602f65f0cdedb21fb28a0bfa8c
      https://github.com/wesnoth/wesnoth/commit/08a866dc20e678602f65f0cdedb21fb28a0bfa8c
  Author: Charles Dang <exodia339 at gmail.com>
  Date:   2017-09-04 (Mon, 04 Sep 2017)

  Changed paths:
    M src/game_initialization/multiplayer.cpp
    M src/wesnothd_connection.cpp
    M src/wesnothd_connection.hpp

  Log Message:
  -----------
  Revert "Refactor out wesnothd_connection_ptr wrapper class"

This reverts commit 699047766a8852014df20c44d5ed84dadb37015e and fixes #1928. It turns out this made it so
the connection was never closed since it was the wrapper object being destroyed that called the stop()
function.

Since a worker thread needed to hold a shared_ptr to the main ptr in order to ensure it wasn't destroyed
early, we can't just have a shared_ptr of wesnothd_connection directly, since the worker ref means it's
never destroyed.





More information about the Commits mailing list