RAII socket close was not hitting in some cases, so I force a close after a write, which is ok since the only one working with that socket is that same class.