Detect read-only connections.

Closes #10