Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
irker
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
iDB
irker
Commits
f069a78d
Commit
f069a78d
authored
Aug 27, 2012
by
Eric S. Raymond
Browse files
Options
Downloads
Patches
Plain Diff
Fix a bug in the termination code.
parent
0fca10af
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
irker.py
+7
-7
7 additions, 7 deletions
irker.py
with
7 additions
and
7 deletions
irker.py
+
7
−
7
View file @
f069a78d
...
@@ -149,8 +149,8 @@ class Irker:
...
@@ -149,8 +149,8 @@ class Irker:
del
self
.
countmap
[(
servername
,
port
)]
del
self
.
countmap
[(
servername
,
port
)]
for
val
in
self
.
sessions
.
values
():
for
val
in
self
.
sessions
.
values
():
if
(
val
.
servername
,
val
.
port
)
==
(
servername
,
port
):
if
(
val
.
servername
,
val
.
port
)
==
(
servername
,
port
):
self
.
sessions
[
servername
].
terminate
()
self
.
sessions
[
val
.
url
].
terminate
()
del
self
.
sessions
[
servername
]
del
self
.
sessions
[
val
.
url
]
def
_handle_ping
(
self
,
connection
,
event
):
def
_handle_ping
(
self
,
connection
,
event
):
"
PING arrived, bump the last-received time for the connection.
"
"
PING arrived, bump the last-received time for the connection.
"
for
(
name
,
server
)
in
self
.
sessions
.
items
():
for
(
name
,
server
)
in
self
.
sessions
.
items
():
...
@@ -171,13 +171,13 @@ class Irker:
...
@@ -171,13 +171,13 @@ class Irker:
else
:
else
:
if
type
(
channels
)
==
type
(
u
""
):
if
type
(
channels
)
==
type
(
u
""
):
channels
=
[
channels
]
channels
=
[
channels
]
for
channe
l
in
channels
:
for
ur
l
in
channels
:
if
type
(
channe
l
)
!=
type
(
u
""
):
if
type
(
ur
l
)
!=
type
(
u
""
):
self
.
logerr
(
"
malformed request - unexpected type: %s
"
%
repr
(
request
))
self
.
logerr
(
"
malformed request - unexpected type: %s
"
%
repr
(
request
))
else
:
else
:
if
channe
l
not
in
self
.
sessions
:
if
ur
l
not
in
self
.
sessions
:
self
.
sessions
[
channe
l
]
=
Session
(
self
,
channe
l
)
self
.
sessions
[
ur
l
]
=
Session
(
self
,
ur
l
)
self
.
sessions
[
channe
l
].
enqueue
(
message
)
self
.
sessions
[
ur
l
].
enqueue
(
message
)
except
ValueError
:
except
ValueError
:
self
.
logerr
(
"
can
'
t recognize JSON on input: %s
"
%
repr
(
line
))
self
.
logerr
(
"
can
'
t recognize JSON on input: %s
"
%
repr
(
line
))
def
terminate
(
self
):
def
terminate
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment