ssl: fix SEGV bug in error logging
ssl: Try to ignore stale errors and log the right ones
Fix SSL write error logging segfault, adjust logging