fix/#156 add test for calling socket.close() in payload