added extra closing test
trigger close event
handle calling close when connection is not connected
v0.3.0