import gevent.monkey
gevent.monkey.patch_all()
import socket
import SSL


def test():
    context = SSL.Context(SSL.TLSv1_METHOD)
    sock = socket.create_connection(('www.google.com', 443), timeout=2)
    connection = SSL.Connection(context, sock)
    connection.set_connect_state()
    connection.do_handshake()
    connection.send('GET / HTTP/1.1\r\n\r\n')
    print(connection.recv(1024))

if __name__ == '__main__':
    test()

@@ -1,51 +1,129 @@
-import gevent.monkey%0Agevent
+from gevent import monkey%0Amonkey.patch_all(thread=False)%0Aimport gevent%0A%0Aimport gevent_openssl%0Agevent_openssl
 .monkey
-.
+_
 patch
-_all
 ()%0A
+%0A
 impo
@@ -132,16 +132,29 @@
  socket%0A
+from OpenSSL 
 import S
@@ -161,13 +161,28 @@
 SL%0A%0A
-%0A
 def 
+lame_connection_
 test
@@ -493,16 +493,86 @@
 1024))%0A%0A
+%0Adef test():%0A    g = gevent.spawn(lame_connection_test)%0A    g.join()%0A%0A
 if __nam

Make the tests work again