summary refs log tree commit diff
path: root/contrib/vertobot/bot.pl
diff options
context:
space:
mode:
authorMatthew Hodgson <matthew@matrix.org>2015-03-14 00:09:21 +0000
committerMatthew Hodgson <matthew@matrix.org>2015-03-14 00:09:21 +0000
commit256fe08963895cf1078f4f57c1c2673529fa25cd (patch)
tree9025c78b31cfcaf3e6231ff10401fbe4c620da49 /contrib/vertobot/bot.pl
parentMerge pull request #108 from matrix-org/metrics (diff)
downloadsynapse-256fe08963895cf1078f4f57c1c2673529fa25cd.tar.xz
uncommited WIP from MWC
Diffstat (limited to '')
-rwxr-xr-xcontrib/vertobot/bot.pl9
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/vertobot/bot.pl b/contrib/vertobot/bot.pl
index 828fc48786..0430a38aa8 100755
--- a/contrib/vertobot/bot.pl
+++ b/contrib/vertobot/bot.pl
@@ -175,13 +175,12 @@ sub on_room_message
 my $verto_connecting = $loop->new_future;
 $bot_verto->connect(
     %{ $CONFIG{"verto-bot"} },
-    on_connected => sub {
-        warn("[Verto] connected to websocket");
-        $verto_connecting->done($bot_verto) if not $verto_connecting->is_done;
-    },
     on_connect_error => sub { die "Cannot connect to verto - $_[-1]" },
     on_resolve_error => sub { die "Cannot resolve to verto - $_[-1]" },        
-);
+)->then( sub { 
+    warn("[Verto] connected to websocket");
+    $verto_connecting->done($bot_verto) if not $verto_connecting->is_done;
+});
 
 Future->needs_all(
     $bot_matrix->login( %{ $CONFIG{"matrix-bot"} } )->then( sub {