Changed the client. Now both client and server work fine.