fix compile error in test, fix websocket close callback