Weird behavior: client connection successful but not really connected to server

Hi, I’m implementing multiplayer in my game using built-in Network and MasterServer from Unity3D.

I started a system that polls server and automatically connect if found. If none are found after a specific period of time (usually 5 seconds), then it automatically acts as a server.
It almost work but it’s kinda weird: it polls correctly for server and can become a server, no problem so far. When I fire up another instance of the game on another computer, it finds the server, its IP is correct but it doesn’t seem to really connect correctly to it.
To be a bit more technical, when using Network.Connect (hostData)[/B], it returns NetworkConnectionError.NoError which means it is connected, right?
When I check the Network.peerStatus it says NetworkPeerType.Disconnected which doesn’t make sense to me since Network.Connect didn’t return any error. And of course, events like OnPlayerConnected, OnPlayerDisconnected and OnConnectedToServer don’t fire.
Does anybody have an explanation/pointers on why Network.Connect() returns NetworkConnectionError.NoError when in reality it isn’t connected. I tried with and without encryption, NAT and ‘Run in Background’ (Project Setting → Player settings) but it doesn’t change anything.
Let me know if you need additional details.
Note: I sometimes get a message about NAT even if NAT is not selected only when encryption is enabled.
Note 2: Max connections is set to 30 when creating the server (should be more than enough to handle a single connection).
Note 3: I’m running Unity3D 3.4.2, one instance on OSX Lion, the other on Windows 7 and both computers are on the same network._

I worked with Bryden on IRC and we found out it was the firewall blocking the connection.

I thought about it but I ruled out since Network.Connect() didn’t return any error. So to me it looks like a bug.

And by the way, why Network and MasterServer must be run in the main thread (they throw exception when in another thread)?
I had to switch to a easy to understand code in a thread to a mix of thread (because of heavy calculation required before I can start the server) and code in Update() which has been changed to avoid blocking it. It would have been much more efficient to have everything in a single thread.