diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-05-02 23:26:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-05-02 23:26:04 +0300 |
commit | 5c9d41ce013205bdef4ebff837fadf2e0763401c (patch) | |
tree | b3bdf8563e8f512d0f43b274a968c8fb40adff9e /src/net/tmwa/network.cpp | |
parent | 4741c7b959384ff9ca6b93d083a87d919ce3ba46 (diff) | |
download | ManaVerse-5c9d41ce013205bdef4ebff837fadf2e0763401c.tar.gz ManaVerse-5c9d41ce013205bdef4ebff837fadf2e0763401c.tar.bz2 ManaVerse-5c9d41ce013205bdef4ebff837fadf2e0763401c.tar.xz ManaVerse-5c9d41ce013205bdef4ebff837fadf2e0763401c.zip |
Add timeout option between connections to sub servers.
This can be usefull for bad and slow connections.
Diffstat (limited to 'src/net/tmwa/network.cpp')
-rw-r--r-- | src/net/tmwa/network.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/net/tmwa/network.cpp b/src/net/tmwa/network.cpp index 956067f4a..c54972253 100644 --- a/src/net/tmwa/network.cpp +++ b/src/net/tmwa/network.cpp @@ -22,6 +22,7 @@ #include "net/tmwa/network.h" +#include "configuration.h" #include "logger.h" #include "net/messagehandler.h" @@ -191,6 +192,9 @@ void Network::disconnect() // need call SDLNet_TCP_DelSocket? SDLNet_TCP_Close(mSocket); mSocket = nullptr; + int sleep = config.getIntValue("networksleep"); + if (sleep > 0) + SDL_Delay(sleep); } } |