Make calls to repli_stream_t::shutdown() safer.
Make calls to repli_stream_t::shutdown() safer.

Could be related to #369, although I'm not sure if we even use shutdown() in an unsafe manner.

jfriedly/rethinkdb,niieani/rethinkdb,pap/rethinkdb,gavioto/rethinkdb,tempbottle/rethinkdb,Qinusty/rethinkdb,sbusso/rethinkdb,AntouanK/rethinkdb,eliangidoni/rethinkdb,RubenKelevra/rethinkdb,ayumilong/rethinkdb,mbroadst/rethinkdb,yaolinz/rethinkdb,eliangidoni/rethinkdb,elkingtonmcb/rethinkdb,grandquista/rethinkdb,eliangidoni/rethinkdb,AntouanK/rethinkdb,gavioto/rethinkdb,nviennot/rethinkdb,nviennot/rethinkdb,matthaywardwebdesign/rethinkdb,lenstr/rethinkdb,alash3al/rethinkdb,sontek/rethinkdb,wujf/rethinkdb,4talesa/rethinkdb,sbusso/rethinkdb,rrampage/rethinkdb,bpradipt/rethinkdb,scripni/rethinkdb,mcanthony/rethinkdb,mquandalle/rethinkdb,jmptrader/rethinkdb,mcanthony/rethinkdb,losywee/rethinkdb,losywee/rethinkdb,Wilbeibi/rethinkdb,captainpete/rethinkdb,jesseditson/rethinkdb,wujf/rethinkdb,4talesa/rethinkdb,yaolinz/rethinkdb,jesseditson/rethinkdb,mquandalle/rethinkdb,robertjpayne/rethinkdb,matthaywardwebdesign/rethinkdb,mcanthony/rethinkdb,Wilbeibi/rethinkdb,grandquista/rethinkdb,ayumilong/rethinkdb,Wilbeibi/rethinkdb,tempbottle/rethinkdb,JackieXie168/rethinkdb,jmptrader/rethinkdb,mbroadst/rethinkdb,spblightadv/rethinkdb,dparnell/rethinkdb,KSanthanam/rethinkdb,wujf/rethinkdb,wujf/rethinkdb,scripni/rethinkdb,catroot/rethinkdb,catroot/rethinkdb,captainpete/rethinkdb,ajose01/rethinkdb,JackieXie168/rethinkdb,AtnNn/rethinkdb,jmptrader/rethinkdb,Qinusty/rethinkdb,robertjpayne/rethinkdb,pap/rethinkdb,elkingtonmcb/rethinkdb,robertjpayne/rethinkdb,marshall007/rethinkdb,AntouanK/rethinkdb,victorbriz/rethinkdb,captainpete/rethinkdb,KSanthanam/rethinkdb,gdi2290/rethinkdb,AtnNn/rethinkdb,jmptrader/rethinkdb,AtnNn/rethinkdb,mquandalle/rethinkdb,jesseditson/rethinkdb,marshall007/rethinkdb,wujf/rethinkdb,yakovenkodenis/rethinkdb,RubenKelevra/rethinkdb,4talesa/rethinkdb,mquandalle/rethinkdb,mcanthony/rethinkdb,sontek/rethinkdb,wkennington/rethinkdb,RubenKelevra/rethinkdb,ajose01/rethinkdb,dparnell/rethinkdb,niieani/rethinkdb,sontek/rethinkdb,tempbottle/rethinkdb,rrampage/rethinkdb,AntouanK/rethinkdb,pap/rethinkdb,elkingtonmcb/rethinkdb,tempbottle/rethinkdb,niieani/rethinkdb,wujf/rethinkdb,matthaywardwebdesign/rethinkdb,grandquista/rethinkdb,catroot/rethinkdb,yaolinz/rethinkdb,bchavez/rethinkdb,bpradipt/rethinkdb,rrampage/rethinkdb,mcanthony/rethinkdb,eliangidoni/rethinkdb,victorbriz/rethinkdb,wkennington/rethinkdb,wojons/rethinkdb,wojons/rethinkdb,bpradipt/rethinkdb,nviennot/rethinkdb,catroot/rethinkdb,alash3al/rethinkdb,greyhwndz/rethinkdb,mquandalle/rethinkdb,AntouanK/rethinkdb,matthaywardwebdesign/rethinkdb,dparnell/rethinkdb,jfriedly/rethinkdb,yakovenkodenis/rethinkdb,ajose01/rethinkdb,yakovenkodenis/rethinkdb,ajose01/rethinkdb,JackieXie168/rethinkdb,KSanthanam/rethinkdb,bchavez/rethinkdb,mcanthony/rethinkdb,jesseditson/rethinkdb,JackieXie168/rethinkdb,bchavez/rethinkdb,pap/rethinkdb,bpradipt/rethinkdb,ajose01/rethinkdb,4talesa/rethinkdb,lenstr/rethinkdb,tempbottle/rethinkdb,niieani/rethinkdb,spblightadv/rethinkdb,ajose01/rethinkdb,eliangidoni/rethinkdb,catroot/rethinkdb,alash3al/rethinkdb,sbusso/rethinkdb,lenstr/rethinkdb,scripni/rethinkdb,urandu/rethinkdb,marshall007/rethinkdb,victorbriz/rethinkdb,AtnNn/rethinkdb,sbusso/rethinkdb,robertjpayne/rethinkdb,marshall007/rethinkdb,mbroadst/rethinkdb,scripni/rethinkdb,wkennington/rethinkdb,yaolinz/rethinkdb,nviennot/rethinkdb,sebadiaz/rethinkdb,gdi2290/rethinkdb,wkennington/rethinkdb,nviennot/rethinkdb,yakovenkodenis/rethinkdb,eliangidoni/rethinkdb,wkennington/rethinkdb,lenstr/rethinkdb,jfriedly/rethinkdb,RubenKelevra/rethinkdb,lenstr/rethinkdb,mbroadst/rethinkdb,AntouanK/rethinkdb,urandu/rethinkdb,sbusso/rethinkdb,bpradipt/rethinkdb,yaolinz/rethinkdb,AtnNn/rethinkdb,dparnell/rethinkdb,robertjpayne/rethinkdb,niieani/rethinkdb,captainpete/rethinkdb,yakovenkodenis/rethinkdb,losywee/rethinkdb,catroot/rethinkdb,urandu/rethinkdb,greyhwndz/rethinkdb,jfriedly/rethinkdb,RubenKelevra/rethinkdb,mbroadst/rethinkdb,pap/rethinkdb,losywee/rethinkdb,bchavez/rethinkdb,grandquista/rethinkdb,eliangidoni/rethinkdb,jfriedly/rethinkdb,greyhwndz/rethinkdb,JackieXie168/rethinkdb,yaolinz/rethinkdb,mbroadst/rethinkdb,robertjpayne/rethinkdb,greyhwndz/rethinkdb,wojons/rethinkdb,sbusso/rethinkdb,mbroadst/rethinkdb,marshall007/rethinkdb,matthaywardwebdesign/rethinkdb,grandquista/rethinkdb,pap/rethinkdb,KSanthanam/rethinkdb,Qinusty/rethinkdb,losywee/rethinkdb,gdi2290/rethinkdb,4talesa/rethinkdb,bpradipt/rethinkdb,wojons/rethinkdb,ajose01/rethinkdb,sontek/rethinkdb,dparnell/rethinkdb,sontek/rethinkdb,nviennot/rethinkdb,lenstr/rethinkdb,matthaywardwebdesign/rethinkdb,wojons/rethinkdb,Wilbeibi/rethinkdb,ayumilong/rethinkdb,elkingtonmcb/rethinkdb,4talesa/rethinkdb,wkennington/rethinkdb,yaolinz/rethinkdb,yaolinz/rethinkdb,bchavez/rethinkdb,bpradipt/rethinkdb,sebadiaz/rethinkdb,rrampage/rethinkdb,spblightadv/rethinkdb,ayumilong/rethinkdb,pap/rethinkdb,mquandalle/rethinkdb,gdi2290/rethinkdb,gavioto/rethinkdb,Wilbeibi/rethinkdb,bchavez/rethinkdb,robertjpayne/rethinkdb,robertjpayne/rethinkdb,alash3al/rethinkdb,ayumilong/rethinkdb,sebadiaz/rethinkdb,pap/rethinkdb,rrampage/rethinkdb,jmptrader/rethinkdb,spblightadv/rethinkdb,tempbottle/rethinkdb,gdi2290/rethinkdb,captainpete/rethinkdb,gavioto/rethinkdb,urandu/rethinkdb,dparnell/rethinkdb,RubenKelevra/rethinkdb,sebadiaz/rethinkdb,urandu/rethinkdb,losywee/rethinkdb,tempbottle/rethinkdb,KSanthanam/rethinkdb,robertjpayne/rethinkdb,lenstr/rethinkdb,marshall007/rethinkdb,jmptrader/rethinkdb,mquandalle/rethinkdb,eliangidoni/rethinkdb,yakovenkodenis/rethinkdb,KSanthanam/rethinkdb,bchavez/rethinkdb,AntouanK/rethinkdb,gavioto/rethinkdb,gdi2290/rethinkdb,rrampage/rethinkdb,greyhwndz/rethinkdb,victorbriz/rethinkdb,mbroadst/rethinkdb,jmptrader/rethinkdb,niieani/rethinkdb,greyhwndz/rethinkdb,spblightadv/rethinkdb,captainpete/rethinkdb,sontek/rethinkdb,dparnell/rethinkdb,niieani/rethinkdb,Wilbeibi/rethinkdb,AtnNn/rethinkdb,tempbottle/rethinkdb,alash3al/rethinkdb,scripni/rethinkdb,nviennot/rethinkdb,sbusso/rethinkdb,grandquista/rethinkdb,alash3al/rethinkdb,wojons/rethinkdb,gavioto/rethinkdb,niieani/rethinkdb,dparnell/rethinkdb,victorbriz/rethinkdb,rrampage/rethinkdb,sebadiaz/rethinkdb,wojons/rethinkdb,gdi2290/rethinkdb,urandu/rethinkdb,AtnNn/rethinkdb,grandquista/rethinkdb,mcanthony/rethinkdb,4talesa/rethinkdb,scripni/rethinkdb,Qinusty/rethinkdb,matthaywardwebdesign/rethinkdb,Qinusty/rethinkdb,ayumilong/rethinkdb,yakovenkodenis/rethinkdb,bchavez/rethinkdb,AntouanK/rethinkdb,Wilbeibi/rethinkdb,urandu/rethinkdb,gavioto/rethinkdb,captainpete/rethinkdb,jesseditson/rethinkdb,KSanthanam/rethinkdb,bpradipt/rethinkdb,ayumilong/rethinkdb,RubenKelevra/rethinkdb,eliangidoni/rethinkdb,JackieXie168/rethinkdb,wkennington/rethinkdb,mquandalle/rethinkdb,grandquista/rethinkdb,elkingtonmcb/rethinkdb,jesseditson/rethinkdb,mbroadst/rethinkdb,Qinusty/rethinkdb,gavioto/rethinkdb,jfriedly/rethinkdb,greyhwndz/rethinkdb,bpradipt/rethinkdb,grandquista/rethinkdb,wujf/rethinkdb,ajose01/rethinkdb,catroot/rethinkdb,lenstr/rethinkdb,victorbriz/rethinkdb,victorbriz/rethinkdb,alash3al/rethinkdb,wkennington/rethinkdb,Wilbeibi/rethinkdb,captainpete/rethinkdb,sbusso/rethinkdb,Qinusty/rethinkdb,yakovenkodenis/rethinkdb,matthaywardwebdesign/rethinkdb,rrampage/rethinkdb,jfriedly/rethinkdb,jfriedly/rethinkdb,losywee/rethinkdb,greyhwndz/rethinkdb,nviennot/rethinkdb,alash3al/rethinkdb,wojons/rethinkdb,AtnNn/rethinkdb,Qinusty/rethinkdb,elkingtonmcb/rethinkdb,spblightadv/rethinkdb,urandu/rethinkdb,JackieXie168/rethinkdb,victorbriz/rethinkdb,spblightadv/rethinkdb,marshall007/rethinkdb,scripni/rethinkdb,sebadiaz/rethinkdb,scripni/rethinkdb,elkingtonmcb/rethinkdb,dparnell/rethinkdb,spblightadv/rethinkdb,sontek/rethinkdb,sebadiaz/rethinkdb,4talesa/rethinkdb,bchavez/rethinkdb,ayumilong/rethinkdb,jesseditson/rethinkdb,KSanthanam/rethinkdb,jesseditson/rethinkdb,losywee/rethinkdb,marshall007/rethinkdb,elkingtonmcb/rethinkdb,sebadiaz/rethinkdb,JackieXie168/rethinkdb,Qinusty/rethinkdb,sontek/rethinkdb,JackieXie168/rethinkdb,jmptrader/rethinkdb,RubenKelevra/rethinkdb,mcanthony/rethinkdb,catroot/rethinkdb