fix encoding of postWait messages sent over websocket
This commit is contained in:
parent
d94a1901ca
commit
97d4f3f527
@ -678,7 +678,7 @@ extension SocketEngine {
|
|||||||
guard let ws = self.ws else { return }
|
guard let ws = self.ws else { return }
|
||||||
|
|
||||||
for msg in postWait {
|
for msg in postWait {
|
||||||
ws.writeString(msg)
|
ws.writeString(fixDoubleUTF8(msg))
|
||||||
}
|
}
|
||||||
|
|
||||||
postWait.removeAll(keepCapacity: true)
|
postWait.removeAll(keepCapacity: true)
|
||||||
|
|||||||
@ -115,7 +115,7 @@ struct SocketPacket {
|
|||||||
type: SocketPacket.logType)
|
type: SocketPacket.logType)
|
||||||
}
|
}
|
||||||
} else if let str = arg as? String {
|
} else if let str = arg as? String {
|
||||||
restOfMessage += "\"\((str["\n"] ~= "\\\\n")["\r"] ~= "\\\\r")\","
|
restOfMessage += "\"" + ((str["\n"] ~= "\\\\n")["\r"] ~= "\\\\r") + "\","
|
||||||
} else if arg is NSNull {
|
} else if arg is NSNull {
|
||||||
restOfMessage += "null,"
|
restOfMessage += "null,"
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user