Skip to content

loop in client can force stack overflow in server #1278

Closed
@simon-lang

Description

@simon-lang

RangeError: Maximum call stack size exceeded

Reproduced on several different OSX and Linux machines with the following code.

server.coffee

io = require('socket.io').listen 8080
io.set 'log level', 0
io.sockets.on 'connection', (socket) ->
  socket.on 'ping', (data) ->
    socket.disconnect()

client.coffee

io = require 'socket.io-client'
socket = io.connect '127.0.0.1:8080'
socket.on 'connect', ->
  while true
    socket.emit 'ping'

Using:

socket.io v0.9.16

socket.io-client v0.9.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions