 On line 44 of the PooledSocket constructor _endpoint is used, but this value has not been set until line 64, Pls move line 64 up to like 38 so that _endpoint is set.