This block should be at the top of the method before the check to if (dataHandler != null) - no need to set context in this case and don't want to lose data in the case the socket has been paused again by the user after resume has been called and data handler set to null