Fix returns in void functions
Fix hang when closing WSSocket