Skip to content

Commit b8a2ab6

Browse files
authored
Merge pull request #714 from qsb-dev/dev
Dev
2 parents 3a808a5 + 600b00b commit b8a2ab6

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

QSB/manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"author": "Nebula, John, Alek, & Rai",
55
"name": "Quantum Space Buddies",
66
"uniqueName": "Raicuparta.QuantumSpaceBuddies",
7-
"version": "1.4.1",
7+
"version": "1.4.2",
88
"owmlVersion": "2.14.0",
99
"dependencies": [ "JohnCorby.VanillaFix" ],
1010
"pathsToPreserve": [ "debugsettings.json" ],

SteamTransport/Client.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public void Close()
135135
IsConnected = false;
136136
// its not an error for us to close ourselves intentionally
137137
// but we do it anyway cuz above comment
138-
_transport.OnClientError?.Invoke(TransportError.ConnectionClosed, "client closed connection, but you shouldnt be seeing this in game. make sure [DEBUG] Debug Mode is on and check logs for stack trace. report this please!");
138+
_transport.OnClientError?.Invoke(TransportError.ConnectionClosed, "client closed connection for unknown reason! turn on \"[DEBUG] Debug Mode\" and \"[DEBUG] Hook Debug Logs\", try again, and report all logs shown!");
139139
_transport.OnClientDisconnected?.Invoke();
140140

141141
_onStatusChanged.Dispose();

SteamTransport/Server.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,8 +103,8 @@ public void Receive()
103103
{
104104
var ppOutMessages = new IntPtr[Util.MaxMessages];
105105

106-
var connList = _conns.ToList();
107-
foreach (var conn in connList)
106+
// receive can result in disconnect, which modifies the collection. we must copy
107+
foreach (var conn in _conns.ToList())
108108
{
109109
var numMessages = SteamNetworkingSockets.ReceiveMessagesOnConnection(conn, ppOutMessages, ppOutMessages.Length);
110110
for (var i = 0; i < numMessages; i++)
@@ -117,8 +117,7 @@ public void Receive()
117117

118118
public void Flush()
119119
{
120-
var connList = _conns.ToList();
121-
foreach (var conn in connList)
120+
foreach (var conn in _conns)
122121
{
123122
var result = SteamNetworkingSockets.FlushMessagesOnConnection(conn);
124123
if (result != EResult.k_EResultOK)

0 commit comments

Comments
 (0)