Fix setting up rate member.
Sleep if packet queue is empty.
Don't lock before checking closed/paused state.

It should be OK since we don't change m_bPaused/m_bClosed
from other threads.
Output incoming connection port number.