[fix] open/close tag setting is not working

fix code and test code
not necessary to listen to a specific port. remove this line is fine :)