Bugfix: if there is still data to write to the socket, defer socket close until that's done
Bugfix: if there is still data to write to the socket, defer socket close until that's done

bitcoin-mining-proxy sends an extra \r\n\r\n which causes an error and closed the socket before the initial request's reply got sent

uingei/eloipool,pointgaming/point-gaming-btc,jameshilliard/4tar-eloipool,ahmedbodi/SHA-Eloipool-MMCFE-,svasva/eloipool,imsaguy/eloipool,thrasher-/eloipool,cinnamoncoin/eloipool-1,wizkid057/eloipool,thrasher-/eloipool,uingei/eloi,thrasher-/eloipool