Add socket test to cover recent moarbug