Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4602c1b

Browse files
committed
Set .addr in a few more places (patch approved by Sam Rushing)
1 parent 4a5a2bc commit 4602c1b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Lib/asyncore.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ def __init__ (self, sock=None, map=None):
201201
# I think it should inherit this anyway
202202
self.socket.setblocking (0)
203203
self.connected = 1
204+
self.addr = sock.getpeername()
204205

205206
def __repr__ (self):
206207
try:
@@ -306,6 +307,7 @@ def connect (self, address):
306307
return
307308
else:
308309
raise socket.error, why
310+
self.addr = address
309311
self.connected = 1
310312
self.handle_connect()
311313

0 commit comments

Comments
 (0)