Merge lp:~ebke/widelands/ping-on-pause into lp:widelands

Proposed by Johannes Ebke
Status: Merged
Merged at revision: 6421
Proposed branch: lp:~ebke/widelands/ping-on-pause
Merge into: lp:widelands
Diff against target: 15 lines (+3/-2)
1 file modified
src/network/nethost.cc (+3/-2)
To merge this branch: bzr merge lp:~ebke/widelands/ping-on-pause
Reviewer Review Type Date Requested Status
Widelands Developers Pending
Review via email: mp+116114@code.launchpad.net

Description of the change

Also start the socket keep-alive ping if all players agree on pausing the game.

To post a comment you must log in.
Revision history for this message
SirVer (sirver) wrote :

Merged in r6421. Thanks Johannes!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/network/nethost.cc'
--- src/network/nethost.cc 2012-07-13 20:46:30 +0000
+++ src/network/nethost.cc 2012-07-21 11:45:25 +0000
@@ -2472,8 +2472,9 @@
2472 }2472 }
2473 }2473 }
24742474
2475 // If a pause was forced, send a ping regulary to keep the sockets up and running2475 // If a pause was forced or if the players all pause, send a ping regularly
2476 if (m_forced_pause && (time(0) > (d->lastpauseping + 20))) {2476 // to keep the sockets up and running
2477 if ((m_forced_pause || realSpeed() == 0) && (time(0) > (d->lastpauseping + 20))) {
2477 d->lastpauseping = time(0);2478 d->lastpauseping = time(0);
24782479
2479 SendPacket s;2480 SendPacket s;

Subscribers

People subscribed via source and target branches

to status/vote changes: