Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gevent
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gevent
Commits
efe67106
Commit
efe67106
authored
Jul 09, 2009
by
Denis Bilenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test__refcount.py: don't rely on GreenSocket.fd having __weakref__ (since it does not anymore)
parent
999d4e87
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
greentest/test__refcount.py
greentest/test__refcount.py
+7
-2
No files found.
greentest/test__refcount.py
View file @
efe67106
...
...
@@ -33,12 +33,17 @@ from time import sleep
import
weakref
import
gc
from
gevent.socket
import
_original_socket
class
Socket
(
_original_socket
):
"Something we can have a weakref to"
address
=
(
'0.0.0.0'
,
7878
)
SOCKET_TIMEOUT
=
0.1
def
init_server
():
s
=
socket
.
socket
()
s
=
socket
.
socket
(
Socket
()
)
s
.
settimeout
(
SOCKET_TIMEOUT
)
s
.
setsockopt
(
socket
.
SOL_SOCKET
,
socket
.
SO_REUSEADDR
,
1
)
s
.
bind
(
address
)
...
...
@@ -64,7 +69,7 @@ def handle_request(s, raise_on_timeout):
def
make_request
():
#print 'make_request'
s
=
socket
.
socket
()
s
=
socket
.
socket
(
Socket
()
)
s
.
connect
(
address
)
#print 'make_request - connected'
res
=
s
.
send
(
'hello'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment