I can't figure out how to play Minecraft two player multiplayer over lan?

I make a single player world. I open it to Lan but when my friend tries to connect it gives them and error. Something like "an existing connection was forcibly closed by the remote host". The weird part is I can see their character in my world for a good minute before they get the error. Does anyone know how to fix this?

I dunna no.