send_error() shouldn't expect that sock will be always non-NULL
send_error() shouldn't expect that sock will be always non-NULL

We are calling send_error when connect is failing and obviously the
sockptr will be NULL in this case

Change-Id: I285fe446456cacb9548f9c06006146d2f61bff6b
Reviewed-on: http://review.couchbase.org/28946
Tested-by: Sergey Avseyev <87f6d5e4fd3644c3c20800cde7fd3ad1569370b3@gmail.com>
Reviewed-by: Trond Norbye <60edd2ef23891a753f231b0c6f161dc634079a93@gmail.com>

avsej/libcouchbase,couchbase/libcouchbase,avsej/libcouchbase,mnunberg/libcouchbase,mnunberg/libcouchbase,maxim-ky/libcouchbase,trondn/libcouchbase,mody/libcouchbase,avsej/libcouchbase,senthilkumaranb/libcouchbase,avsej/libcouchbase,couchbase/libcouchbase,avsej/libcouchbase,uvenum/libcouchbase,senthilkumaranb/libcouchbase,couchbase/libcouchbase,trondn/libcouchbase,signmotion/libcouchbase,uvenum/libcouchbase,kojiromike/libcouchbase,PureSwift/libcouchbase,maxim-ky/libcouchbase,senthilkumaranb/libcouchbase,signmotion/libcouchbase,avsej/libcouchbase,uvenum/libcouchbase,PureSwift/libcouchbase,uvenum/libcouchbase,avsej/libcouchbase,maxim-ky/libcouchbase,couchbase/libcouchbase,trondn/libcouchbase,PureSwift/libcouchbase,mody/libcouchbase,trondn/libcouchbase,senthilkumaranb/libcouchbase,PureSwift/libcouchbase,kojiromike/libcouchbase,signmotion/libcouchbase,couchbase/libcouchbase,trondn/libcouchbase,mnunberg/libcouchbase,couchbase/libcouchbase,maxim-ky/libcouchbase,mody/libcouchbase,couchbase/libcouchbase,mnunberg/libcouchbase,mody/libcouchbase,kojiromike/libcouchbase,mnunberg/libcouchbase,signmotion/libcouchbase,kojiromike/libcouchbase,uvenum/libcouchbase