Skip to content

Commit

Permalink
some asserts in steam sockets
Browse files Browse the repository at this point in the history
  • Loading branch information
malytomas committed Jul 31, 2024
1 parent 8c25480 commit 011eabe
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 8 additions & 2 deletions sources/libcore/network/steam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace cage
{
const ConfigSint32 confDebugLogLevel("cage/steamsocks/logLevel", k_ESteamNetworkingSocketsDebugOutputType_Warning);

constexpr uint32 LanesCount = 8;
constexpr uint32 LanesCount = 4;

CAGE_FORCE_INLINE ISteamNetworkingSockets *sockets()
{
Expand Down Expand Up @@ -223,6 +223,7 @@ namespace cage

~Data()
{
CAGE_ASSERT(sockets());
if (msg)
msg->Release();
}
Expand Down Expand Up @@ -266,7 +267,11 @@ namespace cage
handleResult(sockets()->ConfigureConnectionLanes(sock, LanesCount, nullptr, nullptr));
}

~SteamConnectionImpl() { sockets()->CloseConnection(sock, 0, nullptr, false); }
~SteamConnectionImpl()
{
CAGE_ASSERT(sockets());
sockets()->CloseConnection(sock, 0, nullptr, false);
}

Holder<PointerRange<char>> read(uint32 &channel, bool &reliable)
{
Expand Down Expand Up @@ -347,6 +352,7 @@ namespace cage

~SteamServerImpl()
{
CAGE_ASSERT(sockets());
waiting.terminate();
{
Holder<SteamConnection> c;
Expand Down
1 change: 0 additions & 1 deletion sources/libengine/graphics/shaderProgram.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -770,7 +770,6 @@ namespace cage

void MultiShaderProgram::setDebugName(const String &name)
{
MultiShaderProgramImpl *impl = (MultiShaderProgramImpl *)this;
debugName = name;
}

Expand Down

0 comments on commit 011eabe

Please sign in to comment.