Retrieve error chan from method.

This allows using the error chan in an interface.

Also moved the disconnect error into a named variable for checking specific
errors.
Remove pread
disconnect: Clear callbacks before closing channels
Merge pull request #38 from ecnahc515/custom_handling_disconnect

Custom handling disconnect