fix thread safe issue of connection map