Added on connect function for connection socket that is missing in some cases.
Merge ZeroForm:master to astro:master, Fixes #119, closes#120