Fixed a server connection bug in constantly_receive by removing an ugly break statement and  broke up the listen function into a handle_data function