Skip to content

Commit

Permalink
Added socket.error handler for mcping
Browse files Browse the repository at this point in the history
  • Loading branch information
Yepoleb committed Jun 11, 2014
1 parent 24f3eb6 commit 097c249
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugins/minecraft_ping.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ def mcping_legacy(host, port):
raise PingError("Invalid hostname")
except socket.timeout:
raise PingError("Request timed out")
except socket.error:
raise PingError("Connection refused")

if response[0] != '\xff':
raise PingError("Invalid response")
Expand Down

0 comments on commit 097c249

Please sign in to comment.