Switched packet management to be on the main thread.