Check readCallback before calling handleRead
authorSarang Masti <mssarang@fb.com>
Tue, 9 Jun 2015 18:17:12 +0000 (11:17 -0700)
committerSara Golemon <sgolemon@fb.com>
Mon, 15 Jun 2015 20:34:36 +0000 (13:34 -0700)
commitcbed89541bea7c0ea31551730c16daf806df2834
treef23912f5c44a7e0b98749b832678c5827f88cb01
parentbf87ffac83b2a36aadbb4bb3c106b36258c06a20
Check readCallback before calling handleRead

Summary: Since readCallback_ could be uninstalled in any of callbacks,
we need to ensure that readCallback_ != nullptr before calling
handleRead.

Reviewed By: @djwatson

Differential Revision: D2140054
folly/io/async/AsyncSocket.cpp
folly/io/async/test/AsyncSocketTest.h
folly/io/async/test/AsyncSocketTest2.cpp