Skip to content

Commit

Permalink
fixed bool check for disconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
inlife committed Jul 25, 2019
1 parent 46ba4ac commit 4b69cf5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/librg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1875,6 +1875,8 @@ extern "C" {
return;
}

ctx->network.created = false;

if (librg_is_server(ctx)) {
/* disconnect all users */
for (librg_peer *currentPeer = ctx->network.host->peers; currentPeer < &ctx->network.host->peers[ctx->network.host->peerCount]; ++currentPeer) {
Expand Down Expand Up @@ -1911,8 +1913,6 @@ extern "C" {
enet_host_service(ctx->network.host, &event, 100);
enet_peer_reset(ctx->network.peer);
}

ctx->network.created = false;
}

void librg_network_kick(librg_ctx *ctx, librg_peer *peer) {
Expand Down

0 comments on commit 4b69cf5

Please sign in to comment.