Fixed regression where longpolling transport didn't receive connect messages
- Added test
#1241
Fixed some things based on CR feedback.