Fixed bug that was corrupting data

Two differents connection are made, one to receive data and other to
send data. The data that the real connection sent could be forwarded through
the wrong connection.
Also, removed a few busy waiting.