Mysql Getting Broken Pipe When Passing Mysql Connection To A Python Thread