Fixing allocation of ports for web sockets