bugfix: use so:close instead of socket.close