disconnecet sockets when refreshing