fix shutdown deadlock
fix shutdown deadlock

Reviewed By: praihan

Differential Revision: D26270966

fbshipit-source-id: ec6e16abb51062a06e6c9cd4328b2402cd62f06d

facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift,facebook/fbthrift