summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/generalhandler.cpp8
-rw-r--r--src/net/eathena/generalhandler.h2
-rw-r--r--src/net/eathena/loginhandler.cpp2
-rw-r--r--src/net/generalhandler.h2
-rw-r--r--src/net/tmwa/generalhandler.cpp8
-rw-r--r--src/net/tmwa/generalhandler.h2
6 files changed, 24 insertions, 0 deletions
diff --git a/src/net/eathena/generalhandler.cpp b/src/net/eathena/generalhandler.cpp
index 2a21f90f3..b527aae70 100644
--- a/src/net/eathena/generalhandler.cpp
+++ b/src/net/eathena/generalhandler.cpp
@@ -344,6 +344,14 @@ void GeneralHandler::unload()
clearHandlers();
}
+void GeneralHandler::flushSend()
+{
+ if (!mNetwork)
+ return;
+
+ mNetwork->flush();
+}
+
void GeneralHandler::flushNetwork()
{
if (!mNetwork)
diff --git a/src/net/eathena/generalhandler.h b/src/net/eathena/generalhandler.h
index 8f90d161b..c2cb44787 100644
--- a/src/net/eathena/generalhandler.h
+++ b/src/net/eathena/generalhandler.h
@@ -52,6 +52,8 @@ class GeneralHandler final : public MessageHandler,
void flushNetwork() override final;
+ void flushSend() override final;
+
void clearHandlers() override final;
void reloadPartially() const override final;
diff --git a/src/net/eathena/loginhandler.cpp b/src/net/eathena/loginhandler.cpp
index 8c0b80438..fe10fc335 100644
--- a/src/net/eathena/loginhandler.cpp
+++ b/src/net/eathena/loginhandler.cpp
@@ -26,6 +26,7 @@
#include "gui/windows/logindialog.h"
+#include "net/generalhandler.h"
#include "net/serverfeatures.h"
#include "net/eathena/messageout.h"
@@ -253,6 +254,7 @@ void LoginHandler::sendVersion() const
outMsg.writeInt32(0, "unused");
outMsg.writeInt32(0, "unused");
outMsg.writeInt32(0, "unused");
+ generalHandler->flushSend();
}
void LoginHandler::processServerVersion(Net::MessageIn &msg)
diff --git a/src/net/generalhandler.h b/src/net/generalhandler.h
index 79e0576e7..48fc8bab7 100644
--- a/src/net/generalhandler.h
+++ b/src/net/generalhandler.h
@@ -42,6 +42,8 @@ class GeneralHandler notfinal
virtual void flushNetwork() = 0;
+ virtual void flushSend() = 0;
+
virtual void clearHandlers() = 0;
virtual void reloadPartially() const = 0;
diff --git a/src/net/tmwa/generalhandler.cpp b/src/net/tmwa/generalhandler.cpp
index 483f08ec7..bf7ff4148 100644
--- a/src/net/tmwa/generalhandler.cpp
+++ b/src/net/tmwa/generalhandler.cpp
@@ -286,6 +286,14 @@ void GeneralHandler::unload()
clearHandlers();
}
+void GeneralHandler::flushSend()
+{
+ if (!mNetwork)
+ return;
+
+ mNetwork->flush();
+}
+
void GeneralHandler::flushNetwork()
{
if (!mNetwork)
diff --git a/src/net/tmwa/generalhandler.h b/src/net/tmwa/generalhandler.h
index 453d4e472..118d6dc4d 100644
--- a/src/net/tmwa/generalhandler.h
+++ b/src/net/tmwa/generalhandler.h
@@ -52,6 +52,8 @@ class GeneralHandler final : public MessageHandler,
void flushNetwork() override final;
+ void flushSend() override final;
+
void clearHandlers() override final;
void reloadPartially() const override final;