celic / echo_location_server

A server that echoes locations nearby the given point.
1 stars 0 forks source link

Simultaneous connections are cut short #8

Open arempe93 opened 10 years ago

arempe93 commented 10 years ago

When a client connects before another client is processed, the connection of the first is cut without parsing the JSON. This can be replicated by

# Terminal 1
$ ruby run_server.rb

# Terminal 2
$ telnet localhost 8000 < test.json | telnet localhost 8000 < test.json
celic commented 10 years ago

Whenever a new thread is spawned, instantiate all the globals to 0 or something.