fix wrong usage of socket

should fix #59