Adding function for closing the connection
Signed-off-by: GoelVivek <goelvivek2011@gmail.com>