Skip to content

Commit

Permalink
fix: login crash
Browse files Browse the repository at this point in the history
  • Loading branch information
dudantas committed Dec 2, 2024
1 parent 0a38ac3 commit 3d81799
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/server/network/connection/connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ void Connection::closeSocket() {

void Connection::accept(Protocol_ptr protocolPtr) {
connectionState = CONNECTION_STATE_IDENTIFYING;
g_dispatcher().addEvent([protocol = std::move(protocolPtr)] { protocol->sendLoginChallenge(); }, __FUNCTION__, std::chrono::milliseconds(CONNECTION_WRITE_TIMEOUT * 1000).count());
protocol = std::move(protocolPtr);
g_dispatcher().addEvent([eventProtocol = protocol] { eventProtocol->sendLoginChallenge(); }, __FUNCTION__, std::chrono::milliseconds(CONNECTION_WRITE_TIMEOUT * 1000).count());

acceptInternal(false);
}
Expand Down

0 comments on commit 3d81799

Please sign in to comment.