onmessage function bugfix. add socketConnections pool