clarify the condition the socket read callback gets called
fix SIGSEGV when upgrading to HTTP/2