Bump version to 0.2.4, improved error handling, thread management and connection closing.