lipp / lua-websockets

Websockets for Lua.
http://lipp.github.com/lua-websockets/
MIT License
396 stars 113 forks source link

Fail when client use not supported protocol handler #25

Closed DeLaGuardo closed 11 years ago

DeLaGuardo commented 11 years ago

Error


CALLBACK FAILED: /usr/local/share/lua/5.1/websocket/server_ev.lua:104: attempt to index field '?' (a nil value)

Fix


clients[protocol][self] = nil

if clients[protocol] ~= nil and clients[protocol][self] ~= nil then
  clients[protocol][self] = nil
end
lipp commented 11 years ago

Thanks!

:+1:

... I hav e to test the damn travis test setup...