Check for isAgent() outside the network lock to avoid deadlocks
Check for isAgent() outside the network lock to avoid deadlocks

Signed-off-by: Madhu Venugopal <d22477479bbf55ba62bd822f4112c80f292c7805@docker.com>

mbanikazemi/libnetwork,tmakita/libnetwork,YujiOshima/libnetwork,sainath14/libnetwork,mYmNeo/libnetwork,cpuguy83/libnetwork,WeiZhang555/libnetwork,kolyshkin/libnetwork,mahak/libnetwork,ityangchen/libnetwork,mbanikazemi/libnetwork,ityangchen/libnetwork,medallia/libnetwork,mYmNeo/libnetwork,abhi/libnetwork,cpuguy83/libnetwork,tmakita/libnetwork,WeiZhang555/libnetwork,curtiszimmerman/libnetwork,YujiOshima/libnetwork,curtiszimmerman/libnetwork,docker/libnetwork,fcrisciani/libnetwork,vdemeester/libnetwork,abhi/libnetwork,kolyshkin/libnetwork,msabansal/libnetwork,medallia/libnetwork,docker/libnetwork,medallia/libnetwork,allencloud/libnetwork,msabansal/libnetwork,mahak/libnetwork,vdemeester/libnetwork,kolyshkin/libnetwork,mahak/libnetwork,abhi/libnetwork,allencloud/libnetwork,sainath14/libnetwork,docker/libnetwork,vdemeester/libnetwork,fcrisciani/libnetwork