oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.61k stars 2.72k forks source link

websocket #10832

Closed aguadeowo closed 2 months ago

aguadeowo commented 5 months ago

How can we reproduce the crash?

i just closed and open again my app with bun test.js --watching

const WebSocket = require('ws'); const ws = new WebSocket('wss://stream.binance.com:9443/ws'); const symbols = ['btcusdt','ethusdt'];

ws.on('open', function open() { console.log('Conexión establecida con Binance.'); for (const symbol of symbols) { ws.send(JSON.stringify({ "method": "SUBSCRIBE", "params": [ ${symbol}@ticker ], "id": 1 })); } });

ws.on('message', function incoming(data) { const message = JSON.parse(data); if (message.a) { console.log(Precio de ${message.s}: ${message.a}); } });

ws.on('error', function error(err) { console.error('Error en la conexión:', err); });

ws.on('close', function close() { console.log('Conexión cerrada.'); });

JavaScript/TypeScript code that reproduces the crash?

No response

Relevant log output

No response

Stack Trace (bun.report)

Bun v1.1.6 (e58d67b) on windows x86_64 [AutoCommand]

Segmentation fault at address 0xFFFFFFFFFFFFFFFF

cirospaciari commented 2 months ago

Fixed in canary v1.1.22 if is happening after bun upgrade --canary feel free to reopen