Added disconnect method to the directive and a test so sockets can be disconnected properply if needed