implemented separate protocol and connection rwlocks