Moving drainBuffer() call to execute after socket is closed
Merge pull request #3 from appglu/master

Moving drainBuffer() call to execute after socket is closed
Merge pull request #4 from flozano/master

Moving drainBuffer() call to execute after socket is closed