github requests socket - open and close requests