Got errors over connecting
Closed this issue · 2 comments
geohuz commented
Run with the test.lua in the project, get the following error:
Connecting client to WAMP Server: ws://xxxx/ws/
[DEBUG] (string) "websocket OnOpen event fired"
CALLBACK FAILED: /Users/mac/.luarocks/share/lua/5.2/loowy/client.lua:497: bad argument #1 to 'match' (string expected, got nil)
stack traceback:
[C]: in function 'match'
/Users/mac/.luarocks/share/lua/5.2/loowy/client.lua:497: in function '_wsOnOpen'
/Users/mac/.luarocks/share/lua/5.2/loowy/client.lua:914: in function 'user_on_open'
/Users/mac/.luarocks/share/lua/5.2/websocket/client_ev.lua:73: in function 'on_open'
/Users/mac/.luarocks/share/lua/5.2/websocket/client_ev.lua:186: in function </Users/mac/.luarocks/share/lua/5.2/websocket/client_ev.lua:152>
the 497 line in client.lua:
options.transportEncoding = string.match(wsProtocol,'.*%.([^.]+)$')
the wsProtocol is nil, can't figure out how to fix it. (If I comment out the 497 line it runs without problem)
KSDaemon commented
Hi! Hm... What version of lua-websockets do you use? I suppose it is due to that lua-websockets version used doesn't return subprotocol headers...
geohuz commented
2.2 I suppose