socket-function 0.160.0 → 0.162.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "socket-function",
3
- "version": "0.160.0",
3
+ "version": "0.162.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "dependencies": {
@@ -255,6 +255,9 @@ export async function startSocketServer(
255
255
  // we pipe. This should be very efficient, as pipe has insane throughput
256
256
  // (100s of MB/s, easily, even on a terrible machine).
257
257
  socket.once("data", buffer => {
258
+ if (typeof buffer === "string") {
259
+ buffer = Buffer.from(buffer);
260
+ }
258
261
  buffers.push(buffer);
259
262
  let result = handleTLSHello(Buffer.concat(buffers), buffers.length);
260
263
  if (result === "more") {