Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #195 from whitman/shutdown-hubot

Add bot shutdown function
  • Loading branch information...
commit 53bd377709f8bab0507fd07a8c288c65d173dd7b 2 parents ec5a335 + 44dd87e
@tombell tombell authored
Showing with 5 additions and 0 deletions.
  1. +1 −0  src/adapters/shell.coffee
  2. +4 −0 src/robot.coffee
View
1  src/adapters/shell.coffee
@@ -25,6 +25,7 @@ class Shell extends Adapter
@repl.on "close", =>
stdin.destroy()
+ @robot.shutdown()
process.exit 0
@repl.on "line", (buffer) =>
View
4 src/robot.coffee
@@ -230,6 +230,10 @@ class Robot
run: ->
@adapter.run()
+ shutdown: ->
+ @adapter.close()
+ @brain.close()
+
class Robot.Message
# Represents an incoming message from the chat.
#
Please sign in to comment.
Something went wrong with that request. Please try again.