Skip to content

Commit f1cbc01

Browse files
committed
fixes double json.encode on matchmake requests
1 parent 0148395 commit f1cbc01

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

colyseus/client.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ function Client:create_matchmake_request(method, room_name, options_or_callback,
110110
options = options_or_callback
111111
end
112112

113-
self.http:request('POST', "matchmake/" .. method .. "/" .. room_name, { body = JSON.encode(options), }, function(err, response)
113+
self.http:request('POST', "matchmake/" .. method .. "/" .. room_name, { body = options, }, function(err, response)
114114
if (err) then return callback(err) end
115115

116116
-- forward reconnection token during "reconnect" methods.

colyseus/room.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,6 @@ end
129129

130130
---@private
131131
function Room:_on_message (binary_string, it)
132-
print("_on_message!", binary_string)
133132
local message = utils.string_to_byte_array(binary_string)
134133

135134
local code = message[it.offset]

test/schema_serializer.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
local schema = require 'colyseus.serialization.schema.schema'
22
local schema_serializer = require 'colyseus.serialization.schema'
33
local reference_tracker = require 'colyseus.serialization.schema.reference_tracker'
4-
local JSON = require('colyseus.serialization.json')
54

65
return function()
76
local PrimitiveTypes = require 'test.schema.PrimitiveTypes.PrimitiveTypes'

0 commit comments

Comments
 (0)