title: program stuck in session.join()
body: <p>I am using a crossbar.io router with the below configuration, the C++ program seems to be stuck in session.join() call. </p>
  
  <pre><code>    {
         "controller": {
         },
         "workers": [
            {
               "type": "router",
               "realms": [
               {
                  "name" : "thinqbot",
                  "permissions": [
                              {
                                 "uri": "*",
                     "join" : true,
                                 "publish": true,
                                 "subscribe": true,
                                 "call": true,
                                 "register": true
                              }
                           ]
               }
           ],
               "transports": [
                  {
                     "type": "web",
                     "endpoint":
                 {
                        "type": "tcp",
                        "port": 8080
                     },
                     "paths": {
                        "/": {
                           "type": "static",
                           "directory": ".."
                        },
                        "ws": {
                           "type": "websocket"
                        }
                     }
                  },
              {
                     "type": "rawsocket",
                     "serializer" : "json",
                     "endpoint":
                 {
                        "type": "unix",
                "path" : "/home/rk/router.sock"
                     }
              },
              {
                     "type": "rawsocket",
                     "serializer" : "json",
                     "endpoint":
                 {
                        "type": "tcp",
                        "port": 8082
                     }
              }
               ]
            }
         ]
      }
  </code></pre>
  
  <p>Corresponding C++ code. </p>
  
  <pre><code>int 
  main (int ac, char **av, char **env) 
  {
     try 
     {
        asio::io_service io;
        tcp::socket socket(io);
        tcp::resolver resolver(io);
        auto endpoint_iterator = resolver.resolve({"127.0.0.1", "8082"});
        bool debug = true;
        autobahn::session&lt;tcp::socket, tcp::socket&gt; session(io, socket, socket, debug);
        future&lt;void&gt; session_future;
        std::cerr&lt;&lt;"\nTrying to connect to server ...";
        boost::asio::async_connect(socket, endpoint_iterator,
           [&amp;](boost::system::error_code ec, tcp::resolver::iterator){
       if(!ec){
       std::cerr &lt;&lt; "\nConnected to server" &lt;&lt; endl;
       session.start();
       std::cerr&lt;&lt;"\nSession started.";
       session_future = session.join("realm1").then([&amp;](future&lt;uint64_t&gt; s){
           std::cerr &lt;&lt; "\nSession joined to realm with session ID " &lt;&lt; s.get() &lt;&lt; endl;
           auto c0 = session.call("com.thinqbot.ping")
           .then([](future&lt;any&gt; f){
               std::cerr&lt;&lt;"\nping() invoked successfully";
               });
           c0.wait();
           auto finish = when_all(std::move(c0));
           finish.then([&amp;](decltype(finish)){
               session.publish("com.thinqbot.hello");
               std::cerr&lt;&lt;"\nhello event published";
               session.leave().then([&amp;](future&lt;string&gt; reason){
                   std::cerr &lt;&lt; "\nSession left [" &lt;&lt; reason.get() &lt;&lt; "]" &lt;&lt; endl;
                   io.stop();
                   }).wait();
               });
           });
       } else {
                 std::cerr &lt;&lt; "\nCould not connect to server: " &lt;&lt; ec.message() &lt;&lt; endl;
              }
           }
        );
        io.run();
     }
     catch (std::exception&amp; e) 
     {
        std::cerr &lt;&lt; e.what() &lt;&lt; endl;
        return 1;
     }
     return 0;
  }
  </code></pre>
  
  <p>logs on the router. 
  2014-09-15 14:05:31+0530 [Controller   3457] Log opened.</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] ============================== Crossbar.io ==============================</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] Crossbar.io 0.9.7-6 starting</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] Automatically choosing optimal Twisted reactor</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] Running Twisted reactor twisted.internet.epollreactor.EPollReactor</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] Running on CPython using EPollReactor reactor</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] Starting from node directory /home/rk/work/wamp/.crossbar</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] Starting from local configuration '/home/rk/work/wamp/.crossbar/config.json'</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] No WAMPlets detected in enviroment.</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] Starting Router with ID 'worker1' ..</p>
  
  <p>2014-09-15 14:05:31+0530 [Router       3460] Log opened.</p>
  
  <p>2014-09-15 14:05:31+0530 [Router       3460] Running under CPython using EPollReactor reactor</p>
  
  <p>2014-09-15 14:05:31+0530 [Router       3460] Entering event loop ..</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] Router with ID 'worker1' and PID 3460 started</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] Router 'worker1': realm 'realm1' started</p>
  
  <p>2014-09-15 14:05:31+0530 [Router       3460] Site starting on 8080</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] Router 'worker1': transport 'transport1' started</p>
  
  <p>2014-09-15 14:05:31+0530 [Router       3460] CrossbarWampRawSocketServerFactory starting on u'/home/rk/router.sock'</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] Router 'worker1': transport 'transport2' started</p>
  
  <p>2014-09-15 14:05:31+0530 [Router       3460] CrossbarWampRawSocketServerFactory starting on 8082</p>
  
  <p>2014-09-15 14:05:31+0530 [Controller   3457] Router 'worker1': transport 'transport3' started</p>